|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
32 bit tx system risc tx19 family tmp19a71cyfg ug tmp19a71fyfg ug rev 2.0 feb.2007
tmp19a71 contents 1. features.................................................................................................................... .............. 1-1 2. pin assignments and pin functions ....................................................................................... 2-1 3. prosessor core.............................................................................................................. ......... 3-1 4. memory map.................................................................................................................. ......... 4-1 5. clock / standby control .......................................................................................................... 5-1 6. watchdog timer ............................................................................................................. ........ 6-1 7. exceptions/interrupts ....................................................................................................... ....... 7-1 8. i/o ports................................................................................................................... ............... 8-1 9. debug support unit (dsu) .................................................................................................... .9 -1 10. dma controller (dmac) ...................................................................................................... . 10-1 11. 16-bit timer/event counters (tmrbs) ..................................................................................11-1 12. serial i/o (sio) ..................................................................................................................... 12-1 13. analog-to-digital converters (adcs) .................................................................................... 13-1 14. motor control circuit (pmd: programmable motor driver) ................................................... 14-1 15. encoder input circuit ...................................................................................................... ...... 15-1 16. rom correction............................................................................................................. ....... 16-1 17. flash memory ............................................................................................................... ........ 17-1 18. i/o register summary ....................................................................................................... ... 18-1 19. electrical characteristics ................................................................................................. ..... 19-1 20. package dimensions ......................................................................................................... ... 20-1 tmp19a71 32-bit risc microprocessor tx19 family tmp19a71fyfg/fyug/cyfg/cyug 1. features the tx19a core processor contained in the tmp19a71 is a family of high-performance 32-bit microprocessors that offers the speed of a 32-bit risc solution with the added advantage of a significantly reduced code size of a 16-bit archit ecture. the instruction set of the tx19a includes the high-performance mips32isa, an d is enhanced by the mips16e-tx tm application-specific extensions (ase) based on the highly code-efficient mips16eisa of mips technologies, inc. and with added instructions by toshiba. the tmp19a71 is built on a tx19a core proce sso r and contains a selection of intelligent peripherals. it is suitable for low-voltage and low-power applications. the tmp19a71 has the following features: (1) tx19a core processor (for details, re fer to the tx19a architecture manual.) 1) two instruction set architectu r e (isa) modes: 16-bit isa for code density and 32-bit isa for speed the 16-bit isa is object-code compatible with the code-efficient mips16e tm ase. ? ? ? ? ? ? ? ? ? ? the 32-bit isa is object-code compatible with the high-performance tx39 family. 2) combines high performance with low power consumption. high performance single clock cycle execution (except for save, rest ore, jump/branch instructions) 3-operand computational instructions for high instruction throughput 5-stage pipeline on-chip high-speed memory dsp function: executes 32-bit multiply-accumulate operations (32-bit x 32-bit + 64-bit = 64-bit) in a single clock cycle. low power consumption optimized design using a low-power cell library ? the information contained herein is s ubject to change without notice. 021023_d ? toshiba is continually working to improve the quality and reliability of its products. nevertheless, semiconductor devices in general can malfunction or fail due to their inherent electrical sensitivity and vulnerability to physical stress. it is the responsibi lity of the buyer, when utilizing toshiba products, to comply with the standards of safety in making a safe design for the entire system, and to a void situations in which a malfunction or failure of such toshiba products could cause loss of human life, bodily injury or damage t o property. in developing your designs, please ensure that toshiba products are used within specified operating ranges as set forth in the most recent toshiba products specific ations. also, please keep in mind the precauti ons and conditions set forth in the ?handling gui de for semiconductor devices,? or ?toshiba semi conductor reliability handbook? etc. 021023_a ? the toshiba products listed in this document are intended fo r usage in general electronics app lications (computer, personal equipment, office equipment, measuring equipm ent, industrial robotics, domestic applianc es, etc.). these toshiba products are neither intended nor warranted for usage in equipment that require s extraordinarily high quality and/or reliability or a malfunctionor failure of which may cause loss of human life or bodily injury (?uni ntended usage?). unintended usage include atomic energy control instruments, airplane or spaceship instrum ents, transportation instruments, traffic signal instruments, combustion control inst ruments, medical instruments, all types of safety devices, etc. unin tended usage of toshiba products listed in this document shall be ma de at the customer's own risk. 021023_b ? the products described in this document shall not be used or embedded to any downstream products of which manufacture, use an d/or sale are prohibited under any applicable laws and regulations. 060106_q ? the information contained herein is presented only as a guide for the applications of our products. no responsibility is assu med by toshiba for any infringements of patents or other rights of the th ird parties which may result from its use. no license is gran ted by implication or otherwise under any patent or patent rights of toshiba or others. 021023_c ? the products described in this document are subj ect to the foreign exchange and foreign trade laws. 021023_e ? for a discussion of how the reliability of microcontrollers can be predicted, please refer to section 1.3 of the chapter enti tled quality and reliability assurance/handling precautions. 030619_s 060116ebp tmp19a71 1-1 tmp19a71 programmable standby modes in which processor clocks are stopped ? ? ? ? 3) fast interrupt response suitable for real-time control distinct starting locations for each interrupt service routine automatically generated vector s for each int errupt source automatic updates of the interrupt mask level (2) on-chip program memo ry an d data memory product on-chip rom on-chip ram tmp19a71fyfg/ug 256 kbytes flash rom 10 kbytes tmp19a71cyfg/ug 256 kbytes mask rom 10 kbytes rom correction logic (8 words x 8 blocks) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (3) 8-channel dma controller interrupt- or software-triggered transfer destination: on-chip memory, on-chip peripherals (4) 4-channel 16-bit timer 16-bit interval timer mode 16-bit event counter mode 16-bit ppg output input capture (5) 4-channel general-pu rpose serial interface either uart mode or synchronous mode can be selected for 2 channels; the other 2 chann els are uart only. 50% duty cycle generation (for uart mode only) (6) 2-channel 3-phase pwm generation (pmd) generating 3-phase pwm with a resolution of 35.7 ns (at imclk = 28 mhz) dead time insertion 3-phase pwm generation disabled under abnormal condition two channels can be started synchronously. (7) 1-channel abz encoder supporting incremental encoder rotation direction detection circuit absolute position detection circuit position comparison circuit on-chip noise filter (8) 19-channel 10-bit ad converter (with internal sample and hold) high-speed conversion (min: 2.36 s) input voltage range: 0 v to 3.3 v external trigger supported fixed-channel or channel scan mode single conversion or cont inu ous conversion mode tmp19a71 1-2 tmp19a71 high-priority conversion mode ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ad conversion monitoring pmd mode (9) 1-channel watchdog timer (10) interrupt sources 2 cpu interrupts: software interrupt (within the co-processor) 37 internal interrupts: 7 priority levels (e xc luding the watchdog timer interrupt) 11 external interrupts: 7 priority le vels (excluding the nmi interrupt) (11) 75-pin input/output ports (12) standby modes three standby modes: doze, halt, stop (13) clock generator on-chip pll (x 16) clock gear: divides the high-speed clock to 1/2, 1/4 or 1/8. (14) endian little-endian fixed (15) power voltage peripheral i/o: vcc3 = 3.3v 0.3 v (t mp19a71fyfg/ug, tmp19a71cyfg/ug internal: vcc2 = 2.5v 0.2 v (mp19a71fyfg/ug internal: vccc15 = 1.5v 0.15 v (tmp19a71cyfg/ug (16) operating frequency 56 mhz (vcc2 = 2.5v 0.2 v: tmp19a71fyfg/ug) 56 mhz (vcc15 = 1.5v 0.15 v: tmp19a71cyfg/ug) (17) package p-lqfp100-1414-0.50f (14mm 14m m, 0.5-mm pitch): tmp19a71fyug/cyug p-qfp100-1420-0.65a (14mm 20mm, 0.65-mm pitch ): tmp19a71fyfg/cyfg tmp19a71 1-3 tmp19a71 dmac (8ch) tx19a proccessor core g-bus (32bit) 10-bit adc1 ejtag tx19a cpu intc imbusi/f port0 port1 10-bit adc0 uart0 uart1 ejtag port 16-bit tmr0-3 (4c h) uart3/ sio3 wdt 256kb maskrom 256kb flashrom 10 kbram cg uart2/ sio2 rom correction nmi (p95) int0 (p84) int1 (pa7) a in0 7 (p50 57) a vss a vcc0/vrefh0 txd0 (p80) rxd0 (p81) txd1 (p82) rxd1 (p83) txd2 (p86) rxd2 (p85) reset test0/1 eje p00 p07 p10 p17 tpc (p30) pcst0 (p31) pcst1 (p32) pcst2 (p33) dclk (p34) im-bus (16-bit) pcst4 (p87) pcst3 (p86) dint (p24) tdo (p23) tdi (p22) tms (p21) tck (p20) int2 (pb7) int3 (p64) int4 (p65) int5 (p66) int6 (p67) int7 (p70) int8 (p71) int9 (p72) u1 (pb0) x1 (pb1) v1 (pb2) y1 (pb3) w1 (pb4) z1 (pb5) emg1 (pb6) pmd1 encz (p92) enca (p90) encb (p91) enc u0 (pa0) x0 (pa1) v0 (pa2) y0 (pa3) w0 (pa4) z0 (pa5) emg0 (pa6) pmd0 x1 x2 sclk2/cts2 (p87) txd3 (p91) rxd3 (p90) sclk3/cts3 (p92) a in8 18 (p60 72) a vss tb0in (p93), a vcc1/vrefh1 tb1in (p70), tb2in (p71), tb0out (p94) tb3in (p72), tb1out (p87) tb2out (pa7) tb3out (pb7) ( ): default function after reset figure 1.1 tmp19a71 block diagram tmp19a71 1-4 tmp19a71 2. pin assignments and pin functions this section contains pin assignments for the tmp19a71 as well as brief descriptions of the tmp19a71 input and output signals. 2.1 tmp19a71cyfg/ug pin assignments figure 2.1 shows the pin assignment s of the TMP19A71CYUG. figure 2.1 TMP19A71CYUG pin assignments (100-pin lqfp) note 1: this pin should be set to high during a reset sequence. note 2: these signals are low active. tmp19a71 2-1 tmp19a71 figure 2.2 shows the pin assignment s of the tmp19a71cyfg. figure 2.2 tmp19a71cyfg pin assignments (100-pin qfp) note 1: this pin should be set to high during a reset sequence. note 2: these signals are low active. tmp19a71 2-2 tmp19a71 2.2 tmp19a71fyfg/ug pin assignments figure 2.3 shows the pin assignments of the tmp19a71fyug. figure 2.3 tmp19a71fyug pin assignments (100-pin lqfp) note 1: this pin should be set to high during a reset sequence. note 2: these signals are low active. tmp19a71 2-3 tmp19a71 figure 2.4 shows the pin assignments of the tmp19a71fyfg. figure 2.4 tmp19a71fyfg pin assignments (100-pin qfp) note 1: this signal must be set to high during a reset sequence. note 2: these signals are low active. tmp19a71 2-4 tmp19a71 2.3 pin names and functions table 2.3.1 lists the input and output pins of the tmp19a71, including alternate pin names and func tions for multi-function pins. table 2.3.1 pin names and functions (1/3) pin name number of pins type function p00 to p07 8 input/output port 0: individually programmable as input or output p10 to p17 8 input/output port 1: individually programmable as input or output p20 tck 1 input/output input port 20: programmable as input or output ejtag pin (schmitt-triggered input) p21 tms 1 input/output input port 21: programmable as input or output ejtag pin (schmitt-triggered input) p22 tdi 1 input/output input port 22: programmable as input or output ejtag pin (schmitt-triggered input) p23 tdo 1 input/output output port 23: programmable as input or output ejtag pin p24 dint 1 input/output input port 24: programmable as input or output ejtag pin (schmitt-triggered input) p30 tpc 1 input/output output port 30: programmable as input or output ejtag pin p31 pcst0 1 input/output output port 31: programmable as input or output ejtag pin p32 pcst1 1 input/output output port 32: programmable as input or output ejtag pin p33 pcst2 1 input/output output port 33: programmable as input or output ejtag pin p34 dclk 1 input/output output port 34: programmable as input or output ejtag pin p50 to p57 an0 to an7 8 input input port 5: input-only analog input: input to the ad converter p60 to p63 an8 to an11 4 input input port 60 to 63: input-only analog input: input to the ad converter p64 to p67 an12 to an15 int3 to int6 4 input/output input input port 64 to 67: programmable as sc hmitt-triggered input or output analog input: input to the ad converter external interrupt pins: programmable to be high-l evel, low -level, rising-edge or falling-edge sensitive p70 an16 int7 tb1in 1 input/output input input input port 70: programmable as schmitt-triggered input or output analog input: input to the ad converter external interrupt 7: programmable to be high-leve l, low-level, rising -edge or falling-edge sensitive 16-bit timer input: input to 16-bit timer 1 p71 an17 int8 tb2in 1 input/output input input input port 71: programmable as schmitt-triggered input or output analog input: input to the ad converter external interrupt 8: programmable to be high-leve l, low-level, rising -edge or falling edge sensitive 16-bit timer 2 input: input to 16-bit timer 2 p72 an18 int9 tb3in 1 input/output input input input port 72: programmable as schmitt-triggered input or output analog input: input to the ad converter external interrupt 9: programmable to be high-leve l, low-level, rising -edge or falling-edge sensitive 16-bit timer 3 input: input to 16-bit timer 3 tmp19a71 2-5 tmp19a71 table 2.3.2 pin names and functions (2/3) pin name number of pins type function p80 tx0 1 input/output output port 80: programmable as input or open-drain output serial transmit data 0 p81 rx0 1 input/output input port 81: programmable as input or output serial receive data 0 p82 tx1 1 input/output output port 82: programmable as input or open-drain output serial transmit data 1 p83 rx1 1 input/output input port 83: programmable as input or output serial receive data 1 p84 int0 tb1out 1 input/output input output port 84: programmable as schmitt-triggered input or output external interrupt pin 16-bit timer 1 output: output from 16-bit timer 1 p85 rx2 1 input/output input port 85: programmable as input or output serial receive data 2 p86 tx2 pcst3 1 input/output output output port 86: programmable as input or open-drain output serial transmit data 2 ejtag pin p87 sclk2 cts2 pcst4 1 input/output input/output output output port 87: programmable as schmitt-triggered input or open-drain output serial clock input/output 2 serial clear-to-send 2 ejtag pin p90 enca rx3 1 input/output input input port 90: programmable as schmitt-triggered input or output encoder a-phase input pin serial receive data 3 p91 encb tx3 1 input/output input output port 91: programmable as schmitt-triggered input or output encoder b-phase input pin serial transmit data 3 p92 encz sclk2 cts2 1 input/output input input/output output port 92: programmable as schmitt-triggered input or output encoder z-phase input pin serial clock input/output 3 serial clear-to-send 3 p93 tb0in 1 input/output input port 93: programmable as schmitt-triggered input or output 16-bit timer 0 input: input to 16-bit timer 0 and emergency stop input pin p94 tb0out boot (note) 1 input/output output port 94: programmable as input or output 16-bit timer 0 output: output from 16-bit timer 0 single boot mode set pin: should be set to low to start up in boot mode. p95 nmi 1 input/output input port 95: programmable as schmitt-triggered input or output nonmaskable interrupt request: programmabl e to be rising-edge or falling edge sensitive pa0 u0 1 input/output output port a0: programmable as input or output pmd0: u-phase output pa1 x0 1 input/output output port a1: programmable as input or output pmd0: x-phase output pa2 v0 1 input/output output port a2: programmable as input or output pmd0: v-phase output pa3 y0 1 input/output output port a3: programmable as input or output pmd0: y-phase output pa4 w0 1 input/output output port a4: programmable as input or output pmd0: w-phase output pa5 z0 1 input/output output port a5: programmable as input or output pmd0: z-phase output tmp19a71 2-6 tmp19a71 table 2.3.3 pin names and functions (3/3) pin name number of pins type function pa6 emg0 1 input/output input port a6: programmable as schmitt-triggered input or output pmd0: emergency stop input pin pa7 int1 tb2out 1 input/output input output port a7: programmable as schmitt-triggered input or output interrupt request 1: programmable to be high-level, low-level, rising-edge or falling-edge sensitive 16-bit timer 2 output: output from 16-bit timer 2 pb0 u1 1 input/output output port b0: programmable as input or output pmd1: u-phase output pb1 x1 1 input/output output port b1: programmable as input or output pmd1: x-phase output pb2 v1 1 input/output output port b2: programmable as input or output pmd1: v-phase output pb3 y1 1 input/output output port b3: programmable as input or output pmd1: y-phase output pb4 w1 1 input/output output port b4: programmable as input or output pmd1: w-phase output pb5 z1 1 input/output output port b5: programmable as input or output pmd1: z-phase output pb6 emg1 1 input/output input port b6: programmable as schmitt-triggered input or output pmd1: emergency stop input pin pb7 int2 tb3out 1 input/output input output port b7: programmable as schmitt-triggered input or output interrupt request 2: programmable to be high-level, low-level, rising-edge or falling edge sensitive 16-bit timer 3 output: output from 16-bit timer 3 avss 1 ground pin (0 v) for the ad converter avcc0 /vrefh0 1 3.3-v power supply pin for the ad converter 0 input pin for high reference voltage for t he ad converter (shared with the above pin) avcc1 /vrefh1 1 3.3-v power supply pin for the ad converter 1 input pin for high reference voltage for t he ad converter (shared with the above pin) eje 1 input ejtag enable (low active) reset 1 input reset: initialize lsi (schmitt-triggered i nput with internal pull-up register, low active) test0 1 test pin: this pin should be tied to logic 0. test1 1 test pin: this pin should be tied to logic 0. x1/x2 2 input/output connection pins for a resonator power supply and ground pins for the mask-version product cvcc15 1 1.5-v power supply pin for the oscillator cvss 1 ground pin (0 v) for the oscillator dvcc3 2 3.3-v power supply pin dvcc15 6 1.5-v power supply pin dvss 6 ground pin (0 v) power supply and ground pins for the flash-version product cvcc2 1 2.5-v power supply pin for the oscillator cvss 1 ground pin (0 v) for the oscillator fvcc3 (2) 3.3-v power supply pin for flash macro (shared with dvcc3) fvcc2 2 2.5-v power supply pin for flash macro fvss 2 ground pin (0 v) for flash macro dvcc3 2 3.3-v power supply pin dvcc2 4 2.5-v power supply pin dvss 4 ground pin (0v) note: this pin should be fixed to high in a mask-version product. tmp19a71 2-7 tmp19a71 3. core processor the tmp19a71 contains a high-performance 32-bi t core processor called the tx19a. for a detailed description of the core processor, refer to the tx19a architecture manual. the functions unique to the tmp19a71 not covered in the architecture manual are described below . note: all references to register addresses in the following description assume that the tmp19a71 is operating in little-endian mode. tmp19a71 3-1 3.1 power-up sequence to power up the tmp19a71, we recommend th at the core power supply (2.5 v in a flash-version product and 1.5 v in a mask-version product) be turned on first. 3.2 reset operation to reset the tmp19a71, reset must be asserted for at least a specified period of time, as shown in table 3.2.1 , after the power supply voltage has stabili zed. this tim e period is required to initialize internal circuits. if this requirement is not satisfied, the tmp19a71 may not operate properly due to improper initialization of internal circuits. the incorporated program begins executing 30 usec after reset is released. t able 3.2.1 reset input time reset timing equation (sec) required external reset input time flash-version device: at power-on, and second and subsequent resets (clkmisc.msfr = 0) fixed 1 msec after power supply has st abilized flash-version device: second and subsequent resets (clkmisc.msfr = 1) mask-version device 32/x1 4.6 us (at 7mhz/) or 6.4 us (at 5 mhz) after oscillation has stabilized note: when oscillation is started, oscillation stabilization time and pll lock-up time are additionally required. the following occur as a result of a reset: the system control coprocessor (cp0) registers within the tx19a core processor are init ialized. for details, refer to the tx19a architecture manual. ? ? ? ? the reset exception is taken. program control is t ransferred to the exception handler at a predefined address. this predefined location is called an exception vector, which directly indicates the start of the actual exception handler routine. the reset exception is always vectored to virtual address 0xbfc0_0000 (which is the same as for the nonmaskable interrupt exception). all on-chip i/o peripheral registers are initialized. all port pins, including those multiplexed with on-chip peripheral functions, are conf igured as either general-purpose inputs or general-purpose outputs. note 1: the tmp19a71 must be powered up with reset asserted. the reset state should not be terminated until after the power supply voltage stablizes within the valid operating range. note 2: there is a possibility that on-chip ram locations accessed and general-purpose registers of the selecte d bank may be corrupted during a reset. tmp19a71 3.3 start-up routine the following explains a standard start-up routine. write a start-up routine according to the requirements of your program. 1. enable the shadow register sets set the ssd bit of the sscr register (cp0 register) to 0 to enable the shadow register sets. 2. set the global pointer r28 (gp) and the stack pointer r29 (sp) set the initial values in r28 and r29 as required . when the shadow register sets are used, it is necessary to set r29 se parately for shadow register set 0 an d shadow register sets 1 to 7. 3. set the cp0 status register in the cp0 status register, set the cu0 bit (c p0 usabilit y) to 1, the bev bit (bootstrap exception vector) to 1, and the im[4:2] field (interrupt mask) to 1, as required. 4. set the cp0 cause register set the iv bit (interrupt vector) in the cp0 cause register to 1, as required. 5. set the block decode registers it is necessary to set the block decode registers to change the data read m ethod according to whether the flash-version or mask-version device is used. if this setting is not made, internal rom data cannot be read correctly. the b0dc r and b0dlr registers should be accessed from block 0, and the b1dcr and b1dlr registers should be accessed from block 1. (programming examples) by using instructions stored at 0xbfc0_0000 to 0xbfc1_ffff (0x0000_0000 to 0x0001_ffff): b0dcr 0xf fff_e530 <-- 0x00 b0dlr 0xf fff_e534 <-- 0x3d by using instructions stored at 0xbfc2_0000 to 0xbfc3_ffff (0x0002_0000 to 0x0003_ffff): b1dcr 0xf fff_e538 <-- 0x00 b1dlr 0xf fff_e53c <-- 0x3d tmp19a71 3- 2 tmp19a71 block 0 decode control register 7 6 5 4 3 2 1 0 b0dcr bit symbol D D D D D D D b0decen (0xffff_e530) read/write r/w reset value 0 0 0 0 0 0 0 1 function 1 : f l a s h version 0: mask ver sion note 1: in the mask-version device, the b0decen bit is not initialized by a wdt reset; it is initialized by an external reset. note 2: in the flash-version device, the b0decen bit is not i nitialized by a normal reset; it is initialized by a power-on reset. note 3: the b0dcr should be accessed by an instruction stored in block 0 (0xbfc0_0000 to 0xbfc1_ffff or 0x0000_0 000 to 0x0001_ffff). block 0 decode lock register 7 6 5 4 3 2 1 0 b0dlr bit sy mbol D (0xffff_e534) read/write w reset value D D D D D D D D function the value written in the b0dlr.b0decen bit take s effect b y writing 0x3d in this register. note: the b0dlr should be accessed by an instruction stored in block 0 (0xbfc0_0000 to 0xbfc1_ffff or 0x0000_0000 to 0x0001_ffff). block 1 decode control register 7 6 5 4 3 2 1 0 b1dcr bit sy mbol D D D D D D D b1dece n (0xffff_e538) read/write r/w reset value 0 0 0 0 0 0 0 1 function 1: flash version 0: mask version note 1: in the mask-version device, the b1decen bit is not initialized by a wdt reset; it is initialized by an external reset. note 2: in the flash-version product, the b1decen bit is no t initialized by a normal reset; it is initialized by a power-on reset. note 3: the b1dcr should be accessed by an instruction stored in block 1 (0xbfc2_0000 to 0xbfc3_ffff or 0x0002_0 000 to 0x0003_ffff). block 1 decode lock register 7 6 5 4 3 2 1 0 b1dlr bit sy mbol D (0xffff_e53c) read/write w reset value D D D D D D D D function the value written in the b1dlr.b1decen bit takes effect b y writing 0x3d in this register. note: the b1dlr should be accessed by an instruction stored in block 1 (0xbfc2_0000 to 0xbfc3_ffff or 0x0002_0000 to 0x0003_ffff). tmp19a71 3-3 tmp19a71 3.4 bus cycles in a processor using pipelining like the tx19a core processor, performance is greatly influenced by pipeline hazards. to improve performance, therefore, due consideration must be given to pipeline hazards related to bus cycles. the tx19a core processor controls bus cycles asynchronous to the pipeline (non-blocking loads, etc.) to prevent degradation in performance due to pipeline hazards. in addition, taking account of dma transfer s triggered by external sources, it is extremely difficult to control bus cycles by software. the tx19a core processor is provided with the sync instruction for synchronization of bus cycles. the sync instruction stalls execution of the next instruction until all inst ructions generating bus cycles (including the write buffer) have been completed. the following gives considerations related to bus c ycles through explaining how to use the sync instruction. please note that the following considerations may not apply and other considerations may be required depending on the system. for a detailed description of the write bu ffer and bus cycles, refer to the tx19a architecture manual. 3.4.1 bus cycle execution time table 3.4.1 shows the number of clock cycles required for completing the bus cycle of a load or store i nstruction. since the start timing of each bus cycle varies depending on the write buffer and bus states, the values shown in this table may not always apply. table 3.4.1 number of clock cycles for completing bus cycles 1bit/8 bits (byte) 16 bits (half word) 32 bits (word) on-chip rom 2 clk (fsys): operand 2 clk (fsys): operand (1 clk (fsys): instruction) 2 clk (fsys): operand (1 clk (fsys): instruction) on-chip ram 1 clk (fsys) 1 clk (fsys) 1 clk (fsys) g-bus (cg/irc/dmac) cpu: 3 to 4 clk (fsys) dmac: 4 clk (fsys) cpu: 3 to 4 clk (fsys) dmac: 4 clk (fsys) cpu: 3 to 4 clk (fsys) dmac: 4 clk (fsys) im-bus (i/o registers other than g-bus) (imclk: 28 mhz) cpu: 4 to 5 clk (imclk) dmac: 4 to 5 clk (imclk) cpu: 4 to 5 clk (imclk) dmac: 4 to 5 clk (imclk) cpu: 4 to 5 clk (imclk) dmac: 4 to 5 clk (imclk) tmp19a71 3- 4 tmp19a71 3.4.2 when using instructions executed asynchronous to bus cycles table 3.4.2 lists the co-processor and special-pu r pose instructions that are executed independent of bus cycles to enable and disable interrupts and to enter standby mode. table 3.4.2 state transition instructions not requiring bus cycles operation ei interrupts are enabled 2 clock cycles after the ei instruction is executed (e stage). di interrupts are disabled immediately after the di inst ruction is executed (e stage). (the status change is reflected in the cp0 register after 2 clock cycles). mtc0 writes to the cp0 registers take effect 2 clock cycles after the mtc0 instruction is executed (e stage). (only the interrupt di sable setting takes effect immediately.) wait standby mode is entered 2 clock cycles after the wait instruction is executed. to execute these instructions, caution must be exercised on preceding bus cycles. the fo llowing examples show possible problems. example 1: enabling interrupts after clearing an interrupt source (problem example) lui r27, hi(iclr) sh r26, lo(icl r)(r27) ; clear interrupt source. mtc0 r29, ier ; enable interrupt s. nop nop ; interru pts are actually enabled. in the above example, the mtc0 instruction may be executed before the preceding bus cycle is complet ed so that interrupts are enabled before the interrupt source is cleared as intended. this problem can be avoided by inserting the sync instruction before the mtc0 instruction, as shown below. (workaround example) lui r27, hi(iclr) sh r26, lo(icl r)(r27) ; clear interrupt source. sync ; s tall the next instruction until the interrupt source is cleared. mtc0 r29, ier ; enable interrupt s. nop nop ; interru pts are actually enabled. tmp19a71 3-5 tmp19a71 example 2: exiting standby mode (problem example) ori r26, r0 , 0x0d lui r27, hi(tb0run) sb r26, lo(tb0 run)(r27) ; bit 0(trun) = 1(timer start) wait ; enter st andby mode. nop this is an example of exiting standby mode when the timer reaches the specified time. if th e wait instruction is executed before the preceding bus cycle is completed, standby mode may be entered before the timer is set, making it impossible to exit standby mode. this problem can be avoided by insertin g the sync instruction before the wait instruction so that the wait instruction is stalled until the timer starts counting, as shown below. (workaround example) ori r26, r0 , 0x0d lui r27, hi(tb0run) sb r26, lo(tb0 run)(r27) ; bit 0(trun)=1 (timer start) sync ; s tall until the timer starts counting. wait ; enter st andby mode. nop generally speaking, it is not possible to predict when a bus cycle completes. therefore, we do n ot recommend using the nop instruction instead of the sync instruction in the above examples for waiting for completion of the preceding bus cycle. tmp19a71 3- 6 tmp19a71 3.4.3 when an memory area is modified is it also necessary to exercise caution on bus cycles when a memory area is modified through the rom correction function or an external bus interface. the following shows an example of execution entering an area that is modified by rom correction immediately after the rom correction setting has been made. note: the tmp19a71 does not contai n an external bus interface. example 3: executing the rom correction target area after the rom correction setting has been made (problem example) lui r26, hi(ng_area) addiu r26, r26, lo(ng_area) ; set the addr ess of ng_area to be replaced. lui r27, hi(addreg0) sw r26, l o(addreg0)(r27) ; replace ng_area with 0xffffbf00-. ng_area: ; replaced area nop nop in the above example, execution enters the memory area to be replaced immediately aft er the rom correction setting is made. although instructions are executed sequentially here, this situation may also occu r with a jump or branch instruction. it is not normally possible to know in advance the area to be replaced with the rom correction function. therefore, the sync in struction should be inserted after an instruction for setting rom correction. in this way, the area to be replaced with the rom correction function will not be executed until the relevant processing is completed. (workaround example) lui r26, hi(ng_area) addiu r26, r26, lo(ng_area) ; set the addr ess of ng_area to be replaced. lui r27, hi(addreg0) sw r26, l o(addreg0)(r27) ; replace ng_area with 0xffffbf00-. sync ; s tall until rom correction setting is completed. ng_area: ; replaced area nop nop tmp19a71 3-7 tmp19a71 3.4.4 when the sync instruction is invalidated by an interrupt even if the sync instruction is inserted to prevent possible problems as described in the above examples, the sync instruction may be invalidated by an interrupt. the following shows such a case occurring in the above example 2 (exiting standby mode). example 4: an interrupt invalidating the sync instruction (problem example) ori r26, r0, 0x0d lui r27, hi(tb0run) sb r26, lo(tb0 run)(r27) ; bit0 (trun) = 1 (timer start) sync ; s tall until the timer starts counting. ; omitted ; <---an i nterrupt occurs here. ---- lui r27, hi(tb0run) lb r26, lo(tb0 run)(r27) ; save tb0run on the stack. sb r0 , lo(tb0 run)(r27) ; bit 0 (trun) = 0 (timer stop) (required processing) sb r26, lo(tb0 run)(r27) ; restore tb0run (timer restart). eret ; omitted ; <---end of interrupt service routine---- wait ; enter st andby mode nop this problem can be avoided by inserting the sync instruction at the end of the int errupt service routine (immediately before the eret instruction). tmp19a71 3- 8 tmp19a71 (workaround example) ori r26, r0, 0x0d lui r27, hi(tb0run) sb r26, lo(tb0 run)(r27) ; bit0 (trun) = 1 (timer start) sync ; s tall until the timer starts counting. ; omitted ; <---an i nterrupt occurs here. ---- lui r27, hi(tb0run) lb r26, lo(tb0 run)(r27) ; save tb0run on the stack. sb r0 , lo(tb0 run)(r27) ; bit 0 (trun) = 0 (timer stop) (required processing) sb r26, lo(tb0 run)(r27) ; restore tb0run (timer restart). sync ; s tall until the bus cycle of interrupt service routine completes. ; omitted ; <---end of interrupt service routine---- wait ; enter standby mode. nop tmp19a71 3-9 tmp19a71 3.4.5 write buffer 3.4.5.1 tmp19a71 write buffer the tmp19a71 contains a four-entry fifo writ e b uffer. each pipeline stage is basically executed in a single clock cycle. however, a write bus cycle accessing an area other than on-chip memory may require more than one cloc k cycle. the write buffer is provided to accommodate such speed variations so th at program execution can achieve higher performance. with the tmp19a71 write buffer, a read bus cycle (load instruction) is always stalled until the write buffer becomes empty regardless of the addresses to be accessed by store and load instructions (see figure 3.4.1 ). therefore, bus cycles are always generated in accordanc e with the program execution sequence. figure 3.4.1 tmp19a71 write buffer operation stalled cycles store instruction (1) store (1) sw r10,0x0000(r16) f store (2) sw r11,0x0004 (r16) load (3) lw r20,0x0008 (r16) d e m w f d e m w f d es m bus cycles write cycle store instruction (2) load instruction (3) write buffer write cycle read cycle es es es es e D store instruction is handled first. D w tmp19a71 3- 10 tmp19a71 3.4.5.2 tmp19a70 write buffer (for reference) with the tmp19a70 write buffer, a load instruction may be executed before the im mediately preceding store instruction. in an example shown in figure 3.4.2 , the target addr ess of the third load instruction is different from the target address of the second store instruction that is queued up in the write buffer. in this case, the read bus cycle of the load instruction is processed before the write bus cycle of the store instruction in the write buffer. (if the second and third instructions have the same target address, the load instruction is stalled until the store instruction is completed.) figure 3.4.2 tmp19a70 write buffer operat ion (wi th different target addresses) the following example shows a possible problem case with the tmp19a70 write buffer for r eference. example: reading port 0 (tmp19a70) (problem example) sb r0 , p0ier ; enable port 0 input. lb r10, p0d ; read port 0. in this example, the write buffer may cause the instruction for reading port 0 to be ex ecuted before port 0 is enabled. if this happens, the port output value will be read from port 0. this problem can be avoided by in serting the sync instruction before the load instruction, as shown below, to stall the load instruction until port 0 input is enabled. (workaround example) sb r0 , p0ier ; enable port 0 in put. sync ; s tall until port 0 input is enabled. lb r10, p0d ; read port 0. store instruction (1) store (1) sw r10,0x0000(r16) f store (2) sw r11,0x0004 (r16) load (3) lw r20,0x0008 (r16) d e m w f d e m w f d e m w bus cycles write cycle load instruction (3) store instruction (2) write buffer read cycle write cycle load instruction is handled first. e r r tmp19a71 3-11 tmp19a71 3.4.6 limitations on accessing special-function registers (sfrs) read-modify or read-modify-write instructions must be used with caution on sfrs that include write-only bits or bits that are cleared by a read. 3.4.6.1 sfrs requiring extra caution (1) registers including write-only bits if a read-modify-write instruction is executed on a register including write-only bits with und efined read values, the write operation may not be performed as expected because the value read from each write-only bit cannot be guaranteed. (2) registers including bits cleared by a read if a read-modify or read-modify-write instruction is executed on a register including bits that ar e cleared by a read, the read operation may unintentionally clear these bits. sfrs requiring extra caution are listed in the table below. table 3.4.3 sfrs requiring extra caution functional unit register write-only bits bits cleared by read cg clkact included not included clkspd included not included irc ilev included not included iclr included not included dmac dcr included not included ccrn included not included tmrb tbnmod included not included sio scnmod2 included not included scncr not included included scnbuf included not included scnfrc included not included scnftc included not included adc adnresn not included included adchprn not included included adpres0 not included included pmd emgreln included not included emgcrn included not included abz encoder entncr included not included wdt wdcr included not included flash seqmod included not included tmp19a71 3- 12 tmp19a71 3.4.6.2 bit manipulation instructions requiring extra caution the bit manipulation instructions listed in the table below are read-modify or read -modify-write instructions that must not be used on the sfrs listed in table 3.4.3 . if thes e instructions are used to access the said sfrs, unexpected operation may result. table 3.4.4 read-modify/read-modify-write instructions instruction name access length operation type bit test (btst) 8 bits read modify bit extract (bext) 8 bits read modify bit clear (bclr) 8 bits read modify write bit set (bset) 8 bits read modify write bit insert (bins) 8 bits read modify write add immediate to memory word (addmiu) 32 bits read modify write 3.4.6.3 considerations for access length discrepancy the tx19a core handles bit manipulation instructions by using the access length shown in t able 3.4.4 and internally realizing 1-bit accesses in a pseudo manner. therefore, if bit manipulation instructions are used on the sf rs shown in table 3.4.3, the correct results may not be obtained. this problem can be avoided by using the _rbi modifier that is provided in toshiba?s c compiler for inhibiting bit manipulation instru ctions. for details, re fer to the instruction manual of the c compiler. 3.4.6.4 considerations for using the c compiler if bit fields are used in the sfrs shown in table 3.4.3, the c compiler may generate bit m anipulation instructions or read-modify or read-modify-write instructions of 8-bit or larger quantity. toshiba?s c compiler provides the _rbi modifi er that can be used for inhibiting bit manipulation instructions on specified sfrs. for details, refer to the instruction manual of the c compiler. tmp19a71 3-13 tmp19a71 4. memory map figure 4.1.1 shows memory assignme nt for the tmp19a71. vertual address physical address 0x0000_0000 0xffff_ffff 0x0003_ffff 16 mbytes reserved kseg1 0xbfc0_0000 0xbfc3_ffff 0xff00_0000 kseg2 0x8000_0000 0xa000_0000 16 mbytes reserved 16 mbytes reserved kseg2 (1 gbyte) 16 mbytes reserved kuseg (2 gbytes) on-chip rom shadow inaccessible on-chip peripherals user program area exception vector area 0x4003_ffff 0x4000_0000 0x1fc3_ffff 0x1fc0_0000 maskable interrupt area on-chip ram (10 kb) reserved for debugging (2mb) (reserved) (reserved) 512 mbytes on-chip rom kuseg kseg0 0xffff_bfff 0xffff_9800 0xff3f_ffff 0xff20_0000 0xff00_0000 0x1fc3_ffff 0x1fc0_0500 0x1fc0_0000 figure 4.1.1 memory map note 1: the on-chip 256-kbyte rom is mapped to virtual addresses from 0x0000_0000 through 0x0003_ffff or 0xbfc0_0000 through 0xbfc3_ffff. the on-chip 10-kbyte ram is mapped to virtual addresses from 0xffff_9800 through 0xffff_bfff. note 2: since the physical address space from 0xffff_4000 through 0xffff_bfff is reserved as the ram area, do not access t he region except that within which ram is located. note 3: the on-chip rom is located in a linear address space beginning at physical address 0x0000_0000 or 0xbfc0_0000. a ll types of exceptions are vectored to the on-chip rom when the bev bit of the system control coprocessor?s status register is set to the default value of 1. (when bev = 0, not all exception vectors reside in contiguous locations.) when external memory is used, the bev bit can be cleared to 0. using the 0x0000_0000 32kb virtual address space helps to improve code efficiency. the virtual address space begi nning at 0x0000_0000 is a shadow of the on-chip memory beginning at 0xbfc0_0000, and references to this space are rerouted to the on-chip rom. examples: 32-bit isa ? a ccessing the 0x0000_0000 32kb space lw r2, io (_t) (r0) ; (r2) da ta of 0x0000_xxxx a ccessed with a single instruction ? a ccessing other locations lui r3, hi (_f) ; upp er 16 bits of address are loaded into r3. lw r2, io (_f) (r3) ; lo wer 16 bits of address must be added to upper 16 bits. note 4: no instruction should be placed in the last four words of the physical address space because the instruction prefet ch circuit will access a location beyond the on-chip rom area. ? 0xbfc3 _fff0 through 0xbfc3_ffff of 256-kbyte on-chip rom note 5: the tmp19a71 is always operated in the kernal mode. the user mode should not be used. tmp19a71 4-1 tmp19a71 5. clock/standby control 5.1 standby control the tmp19a71 provides support for several leve ls of power reduction. while in normal mode, setting the rp bit in the system control coprocessor (cp0)?s status register and then executing the wait instruction cause the tmp19a71 to enter one of the standby modes?idle (halt, doze) or stop?as specified by the ss field of the clkspd register. the characteristics of idle and stop modes are as follows: idle: in idle mode, the tx19a core processor stops. idle mode can be exited by a hardware interrupt, a nonmaskable interrupt (nm i) or a reset. the latter two include those triggered by the watchdog timer. if the level of a wakeup interrupt set in the ilxx field of the imrxx register is lower than the mask level set in the cmask field of the ilev register, the tmp19a71 does not wake up from idle mode. if the interrupt level is higher than the mask level, the tmp19a71 returns to normal mo de and then services the interrupt. note 1: in halt mode, the tmp19a71 freezes the tx19a core processor, preserving the pipeline state. in halt mode, the tmp19a71 ignores any external bus requests; so it continues to assume bus mastership. note 2: in doze mode, the tmp19a71 freezes the tx19a core processor, preserving the pipeline state. in doze mod e, the tmp19a71 recognizes external bus requests. stop: in stop mode, the whole tmp19a71 stops. stop mode can be exited by int0 to int3, nmi or a reset. the latter two do not inclu de those triggered by the watchdog timer. when int0 to int3 are used for waking up fro m stop mode, set clkw0.w0we = 1 for int0 and clkintx.ixki = 1 for int1 to int3. if one of these interrupts occurs and the interrupt level set in the imrxx.ilxx field is higher than the mask level set in the ilev.cmask field, the tmp19a71 returns to normal mode and then services the interrupt. the interrupt level of int0 to int3, when used for exiting stop mode, should be set to a valu e higher than the mask level. tmp19a71 5-1 tmp19a71 (1) tmp19 a71 operation in normal and standby modes table 5.1.1 tmp19a71 operation in normal and standby modes operating mode operating status normal the tx19a core processor and on-chip per ipheral s operate at frequencies specified in the cg block. idle (halt) the processor and dmac operations stop; other o n-chip peripherals are active. idle (doze) the processor stops; on-chip peri pherals including dmac are active. stop all processor and peripheral operations stop completely. (2) cl ock generation operation in normal and standby modes table 5.1.2 block generation operation in normal and standby modes clock source mode oscillator clock suppl y to peripherals clock supply to cpu normal on on on external crystal idle (halt) on on off idle (doze) on on off stop off off off on: operating, or clock supplied off: stopped, or clock not supplied (3) processor and peripheral block operation in standby modes table 5.1.3 processor and peripheral blocks in standby modes circuit block clock source idle (doze) idle (halt) stop tx19a processor core dmac intc cg fsys off on on on off off on on off off off (note 1) off (note 1) wdt i/o ports imclk on on on on off (note 2) on (note 3) note 1: in stop mode, clock supply is stopped but int0 to int3 can be used to wake up from stop mode. after stop mode is exited, the intc accepts the interrupt request. note 2: the wdt stops operating in stop mode. the wdt counter value is not cleared after stop mode is exited. note 3: i/o ports are not automatically disabled upon entering idle or stop mode. to reduce power consumption, i/o p orts should be disabled before entering idle or stop mode. tmp19a71 5- 2 tmp19a71 5.2 clock source block diagram 5.2.1 block diagram high-speed oscillator x16 pll warm-up timer 2 8 4 2 3 4 5 imclk (im bus clock) fsys (system clock) clkosc tmp19a71 5.3.2 register description clock generator activate register 7 6 5 4 3 2 1 0 bit symbol act clkact read/write w (0xffff_d300) reset value 0 0 0 0 0 0 0 0 function 15 14 13 12 11 10 9 8 bit symbol act read/write w reset value 0 0 0 0 0 0 0 0 function the settings made in the cg registers take effect by writing 0x5a5a and then 0xf0f0 consecutively in this register within 64 system clock cycles after the settings are made. note 1: this register must be accessed as a 16-bit quantity; bit manipulation instructions cannot be used. note 2: the settings made in the cg registers take effect by writing 0x5a5a and then 0xf0f0 consecutively in this register within 64 system clock cycles after the settings are made. if this time limit is not observed, the settings will not take effect. 0xffff_d31d 0x03 0xffff_d31a 0x02 0xffff_d300 0xffff_d300 0x5a5a 0xf0f0 address data 0xffff_d31a 0x02 0xffff_d300 0x5a5a 0xf0f0 address data 0xffff_d300 0xffff_d31d 0x03 0xffff_d31a 0x02 0xffff_d300 0xffff_d300 0x5a5b 0xf0f0 address data valid example invalid example 1 invalid example 2 64 clock cycles exceeded keyword input error figure 5.3.1 example of how to use the clock generator activate register tmp19a71 5- 4 tmp19a71 oscillator setting register 7 6 5 4 3 2 1 0 clkosc bit symbol xen rxen drvh (0xffff_d304) read/write r/w reset value 1 0 1 0 0 0 0 0 function oscillator 0: disable 1: enable must be set to 0. oscillator after e xiting stop mod e 0: disable 1: enable must be set to 0. oscillator amp capability 0:normal 1: low must be set to 0. warm-up setting register 7 6 5 4 3 2 1 0 clkwut bit symbol wthd wthw wtht (0xffff_d305) read/write r r/w r/w r r/w reset value 1 1 11 0 1 1 1 function warm-up end flag 0: warming up 1: complete warm-up operation enable 0: no w arm-up 1: enable w arm-up operation oscillator warm-up time 00:2^8 clock cycles 01:2^12 clock cycles 10:2^14 clock cycles 11:2^16 clock cycles note 1: the warm-up time set in the wtht field is counted using the fosc clock. note 2: when the wthw bit is set to 1, the warm-up time set in the wtht field is automatically inserted before clock oscillation is started. at power-on, if a reset state is released without waiting for 2^16 clock cycles, the internal circuits may not be initialized properly. note 3: during the warm-up period, no clock is supplied to the internal circuits. tmp19a71 5-5 tmp19a71 mode switch register 7 6 5 4 3 2 1 0 clkspd bit symbol ss (0xffff_d306) read/write r/w w r/w r reset value 1 00 1 0 0 0 0 function must be set to 1. standby mode (note 1) 00: normal mode 01: stop mode 10: reserved 11: idle (halt) mode must be set to 1. must be set to 0. note 1: the clkspd.ss field selects the standby mode in combination with the rp bit of cp0?s status register, as shown in the table below. the x mark indicates that the wait instruction cannot be used in that mode. clkspd.ss halt doze rp=0 rp=1 normal 00 x x stop 01 stop x reserved 10 x x idle 11 halt doze note 2: each time the tmp19a71 is placed in a standby mode, set the clkspd.ss field before executing the wait instruction. the wait instruction should not be executed successively. note 3: to set the clkspd.ss field to a value other than 00, be sure to set 0x5a5a and 0xf0f0 to the clkact register ex clusively to enable the clkspd.ss setting. if other clock generator registers are set at the same time, the settings may not be reflected correctly. note 4: this register does not support bit manipulation instructions. tmp19a71 5- 6 tmp19a71 clock gear control register 7 6 5 4 3 2 1 0 clkprsc bit symbol prs1 prs2 (0xffff_d307) read/write r/w r reset value 00 000 0 0 0 function system clock (fsys) 00: 1/2 frequency 01: 1/4 frequency 10: 1/8 frequency 11:reserved imclk clock 000: 1/2 frequency 010: 1/3 frequency 100: 1/4 frequency 110: 1/5 frequency others: reserved note: before changing the system clock setting, make sure that all peripheral functions are stopped. 5.3.3 interrupt registers nmi setting register 7 6 5 4 3 2 1 0 clknmi bit symbol nmisen nmibe (0xffff_d310) read/write r/w r reset value 00 0 0 0 0 0 0 function nmi sensitivity 00: prohibited 11: both edges 01: rising edge 10: falling edge c l k n m i setting enable 0: enable 1: disable note 1: setting this register causes the nmibe bit to be set to 1, disabling any subsequent writes to this register until a reset is applied. note 2: to use nmi, appropriate settings must be made in the relevant port registers. for details, see 8. i/o port s?. int0 setting register 0 7 6 5 4 3 2 1 0 clkw0 bit symbol D D D D w0we (0xffff_d312) read/write r/w r reset value 0 0 0 0 0 0 0 0 function must be set to 0. must be set to 0. must be set to 0. must be set to 0. int0 interrupt t ype 0: typical interrupt 1: wake-up signaling note: the w0we bit must be set to 1 to use int0 as the wake-up signaling to take the tmp19a71 out of stop mode. tmp19a71 5-7 tmp19a71 int0 setting register 1 7 6 5 4 3 2 1 0 clkint0 bit symbol i0sen (0xffff_d31a) read/write r/w r reset value 000 0 0 0 0 0 function int0 sensitivity 001: rising edge 010: falling edge 011: both edges 101: high level 110: low level others: disable int1 setting register 7 6 5 4 3 2 1 0 clkint1 bit symbol i1sen i1ki (0xffff_d31b) read/write r/w r r/w r reset value 000 0 0 0 0 0 function int1 sensitivity 001: rising edge 010: falling edge 011: both edges 101: high level 110: low level others: disable int1 interrupt t ype 0: typical interrupt 1: wake-up signaling note: the i1ki bit must be set to 1 to use int1 as the wake-up signaling to take the tmp19a71 out of stop mode. int2 setting register 7 6 5 4 3 2 1 0 clkint2 bit symbol i2sen i2ki (0xffff_d31c) read/write r/w r r/w r reset value 000 0 0 0 0 0 function int2 sensitivity 001: rising edge 010: falling edge 011: both edges 101: high level 110: low level others: disable int2 interrupt t ype 0: typical interrupt 1: wake-up signaling note: the i2ki bit must be set to 1 to use int2 as the wake-up signaling to take the tmp19a71 out of stop mode. tmp19a71 5- 8 tmp19a71 int3 setting register 7 6 5 4 3 2 1 0 clkint3 bit symbol i3sen i3ki (0xffff_d31d) read/write r/w r r/w r reset value 000 0 0 0 0 0 function int3 sensitivity 001: rising edge 010: falling edge 011: both edges 101: high level 110: low level others: disable int3 interrupt t ype 0: typical interrupt 1: wake-up signaling note: the i3ki bit must be set to 1 to use int3 as the wake-up signaling to take the tmp19a71 out of stop mode. tmp19a71 5-9 tmp19a71 5.3.4 reset registers clock generator setting register (mask-version product) 7 6 5 4 3 2 1 0 clkmisc bit symbol mswdr msnmi msbc (0xffff_d30d) read/write r/w r reset value 0 0 0 0 0 00 0 function wdt r eset flag 0: no wdt res et 1: wdt res et occurred must be set to 0. must be set to 0. nmi source flag 00: external pin 01: wdt 10: bus error (store) cg access flag 0: access enabled 1: access disabled note 1: bits 7 to 5 of the clkmisc register are not init ialized by a wdt reset; they are initialized by an external reset. note 2: the mswdr bit is not initialized by a wdt reset; it is initialized by an external reset. to clear this bit af ter a wdt reset occurred, it must be programmed to 0. note 3: the msbc bit indicates whether or not new settings can be made to the cg registers. when msbc = 1, the set tings in the cg registers are in the middle of being changed after the clkact register is set. the msbc bit must be cleared to 0 before new values can be written to the cg registers. clock generator setting register (flash-version product) 7 6 5 4 3 2 1 0 clkmisc bit symbol mscw msfr mswdr D D msnmi msbc (0xffff_d30d) read/write r/w r reset value 0 0 0 0 0 00 0 function reset type 0: power- on reset 1: normal res et flash reset by wdt or external reset 0: enable 1: disable wdt reset flag 0: no wdt res et 1: wdt res et occurred must be set to 0. must be set to 0. nmi source flag 00: external pin 01: wdt 10: bus error (store) cg access flag 0: access enabled 1: access disabled note 1: bits 7 to 5 of the clkmisc register are not initialized by a normal reset; they are initialized by a power-on reset. note 2: the mswdr bit is not initialized by a normal reset; it is initialized only by a power-on reset. to clear this bit after a wdt reset occurred, it must be programmed to 0. note 3: the mscw bit is not initialized by a normal rese t; i t is initialized only by a power-on reset. this bit can be used as a flag to indicate whether a power-on or normal reset occurred by programming this bit to 1 after a power-on reset. this bit is not automatically set to 1 by a normal reset. note 4: the msbc bit indicates whether or not new settings can be made to the cg registers. when msbc = 1, the set tings in the cg registers are in the middle of being changed after the clkact register is set. the msbc bit must be cleared to 0 before new values can be written to the cg registers. note 5: when the msfr bit is set to 1, the flash rom is not initialized by an external or wdt reset. to program or erase t he flash rom, this bit should be set to 0. tmp19a71 5- 10 tmp19a71 6. watchdog timer (wdt) the tmp19a71 contains a watchdog timer (wdt). the wdt is used to regain control of the system in the event of software system lockups due to spurious noises, etc. when a watchdog timer time-out occurs, the wdt generates a nonm askable interrupt (nmi) or a reset exception to the tx19a core processor. 6.1 operational overview the wdt can be programmed to generate a reset or nmi upon time-out. when nmi is selected, a reset occurs upon counter overflow. 6.1.1 generating an nmi (wdmod.rescr = 0) if the wdt counter is not cleared within the time-out period set in the wdmod.ftp field, the wdt generates an nmi upon time-o ut. then, the wdt continues counting. if the 23-bit binary counter is not cleared before it overflows (about 300 ms with imclk = 28 mhz), the wdt generates a reset exception. this causes the wdt to be initialized and start counting again with the default setting. note: after an nmi occurs, save necessary data on the stack and wait for an overflow reset. reset by wdt overflow wdt starts counting nmi generated wdmod.ftp figure 6.1.1 wdt operation when wdmod.rescr=0 6.1.2 generating a reset (wdmod.rescr = 1) if the wdt counter is not cleared within the time-out period set in the wdmod.ftp field, the wdt generates a reset exception upon time-out. a reset exception causes the wdt to be initialized and start counting again with the default setting. reset, causing wdt to be cleared and start counting again wdt starts counting wdmod.ftp figure 6.1.2 wdt operation when wdmod.rescr=1 tmp19a71 6-1 tmp19a71 6.2 register description the wdt is controlled by two control regi sters (wdmod, wdcr) and a counter (wdcnt), as shown in table 6.2.1 . table 6.2.1 wdt register map address number of bit s mnemonic register name 0xffff_c830 16 8 wdmod (l) watchdog timer mode register (low) 0xffff_c831 8 (wdmodh) (watchdog timer mode register high) 0xffff_c834 8 wdcr watchdog timer control register 0xffff_c838 16 wdcnt watchdog timer count register note: although the wdmod register is a 16-bit register, the lower 8 bits (wdmodl) and upper 8 bits (wdmodh) can be accessed separately. 6.2.1 watchdog timer mode register (wdmod) watchdog timer mode register 7 6 5 4 3 2 1 0 bit symbol D ftp D wden D rescr read/write r r/w r/w reset value 0 010 0 1 0 0 function can be read as 0. time-out period 000: 2^12 (about 0.15 ms at imclk=28 mhz) 001: 2^13 (about. 0.29 ms at imclk=28 mhz) 010: 2^14 (about 0.59 ms at imclk=28 mhz) 011: 2^15 (about 1.2 ms at imclk=28 mhz) 100: 2^16 (about 2.3 ms at imclk=28 mhz) 101: 2^19 (about 18.7 ms at imclk=28 mhz) 110: 2^21 (about 74.9 ms at imclk=28 mhz) 111: 2^22 (about 150 ms at imclk=28 mhz) must be set to 0. wdt enable 0: disable 1: enable must be set to 0. reset type 0: nmi upon time-out 1: reset exception upon time-out 15 14 13 12 11 10 9 8 bit symbol D D D D D D read/write r/w r r/w reset value 0 0 0 0 0 000 function must be set to 0. must be set to 0. must be set to 0. can be read as 0. can be read as 0. wdmod(l) (0xff ff_c830) (wdmodh) (0xff ff_c831) note: do not change bits other than the wden bit while the wdt is operating. tmp19a71 6-2 tmp19a71 (1) first time-out pe riod (wdmod.ftp) this 3-bit field determines the duration of th e wdt time-out interval. upon reset, the ftp field is initialized to 010. possible time-out intervals are shown in the register table. (2) wdt enable (wdmod.wden) upon reset, the wden bit is set to 1, enabling the wdt. to disable the wdt, the cl earing of the wden bit must be follow ed by a write of a special disable code (b1h) to the wdcr register. this prevents a ?lost? program from disabling the wdt operation. the wdt can be re-enabled simply by setting the wden bit. (3) wdt res et (wdmod.rescr) when rescr=1, a reset exception is generated and the wdt is initialized upon wdt time-out. when rescr=0, an nmi is generated upon wdt time-out and then a reset exception is generated upon counter overflow. tmp19a71 6-3 tmp19a71 6.2.2 watchdog timer control register (wdcr) this register is used to disable the wdt and to clear the wdt binary counter. watchdog timer control register 7 6 5 4 3 2 1 0 bit symbol D read/write w reset value ? function b1h : wdt disable code 4e h: wdt clear-count code wdcr 0xff ff_c834 wdt disable and clear -count 0xb1 disable code 0x4e clear-count code others invalid note: this register does not support bit manipulation instructions. ? ? ? disabling the wdt the wdt can be disabled by clearing the wdmod.wden to 0 and then writing the disab le code (b1h) to the wdcr register. at this time, the counter value is maintained. before enabling the wdt again, clear the counter by writing the clear-count code (4eh). wdmodl ? ? ? ? ? 0 ? ? clear the wden bit to 0. wdcr 1 0 1 1 0 0 0 1 write the disable code (b1h) to the wdcr. enabling the wdt the wdt can be enabled simply by setting the wden bit in the wdmod to 1. clearing the wdt counter writing the clear-count code (4eh) to the wdcr resets the binary counter to 0. the count ing process begins again. wdcr 0 1 0 0 1 1 1 0 write the clear-count code (4eh) to the wdcr. watchdog counter register 7 6 5 4 3 2 1 0 bit symbol D read/write r reset value 0 function 15 14 13 12 11 10 9 8 bit symbol D read/write r reset value 0 function bits 22 to 7 of the wd t counter value can be read. wdcnt 0xffff_c838 tmp19a71 6-4 tmp19a71 tmp19a71 7-1 7. exceptions/interrupts 7.1 overview tmp19a71 has exceptions of 15 types incl uding nonmaskable interrupt (nmi) and 49 maskable interrupt sources as listed below. ? gereral exceptions reset exception nonmaskable interrupt (nmi) exception address error exception (instruction fetch) address error exception (load/store) bus error exception (instruction fetch) bus error exception (data access) coprocessor unusable exception reserved instruction exception integer overflow exception trap exception system call exception breakpoint exception ? debug exceptions single step exception debug breakpoint exception ? interrupts maskable software in t errupts (2 sources) maskable hardware interrupts (37 internal sources and 10 external sources) tmp19a71 can process not only interrupt requests from on-chip peripheral hardware and ext ernal sources but also exceptions forcibly as measures of notification of error conditions arising in execution of general instructions. by using the register bank called "shadow register set" newly implemented in the tx19a proc essor core, it is now unnece ssary to save the general-purpose register (gpr) contents elsewhere upon interrupt response thus leading to very fast interrupt response. interrupt requests can be nested according to pr ogr ammable priority of seven levels. it is also possible to mask interrupt requests of priority levels lower than the specified mask level. tmp19a71 tmp19a71 7-2 7.2 exception vectors an exception vector address is the entry address of a routine that handles an exeption. reset and nonmaksable interrupt exceptions are ve ctored to address 0xbfc0_0000. a debug exception is vectored to 0xbfc0_0480 when the ejtag proben signal is 0 and 0xff20_0200 when the ejtag proben signal is 1 according to the internal signal value of proben.values of other exceptions may be various depending on the bev bit of the status register and the iv bit of the cause register belonging to the system control coprocessor (cp0). table 7.2.1 exception vector table (virtual addresses) exception type bev=0 bev=1 reset, nmi 0xbfc0_0000 0xbfc0_0000 debug exception (en=0) 0xbfc0_0480 0xbfc0_0480 debug exception (en=1) 0xff20_0200 0xff20_0200 interrupt (iv=0) 0x8000_0180 0xbfc0_0380 interrupt (iv=1) 0x8000_0200 0xbfc0_0400 other general exceptions 0x8000_0180 0xbfc0_0380 note 1 : when exception vector addresses reside in the on-chip rom, the bev bit of the cp0 status register must be set to 1. tmp19a71 has no external bus interface, so status.bev=0 is not allowed. note 2 : to assign different exception vector addresses for interrupts and other general exceptions, set the iv bit of t he cp0 cause register to 1. 7.3 reset exception a reset exception occurs when an external reset pin is driven low or the wdt counts to its reset value. as a reset exception occurs, on-chip peripheral registers (note 1) and cp0 registers are initialied, and a control jumps to the exception vector address 0xbfc0_0000. upon a reset exception, the pc value is stored in the cp0 errorepc register. when a reset exception occurs, the erl bit of th e cp0 st atus register is set to 1, disabling interrupts. to use interrupts, the erl bit must be cleared to 0 in the startup routine (reset exception handler) or by other means. for a detailed description of reset exception handling, refer to the chapter exception hand ling reset exception in the 32-bit tx19 system risc tx19 family architecture manual. note 1 : in the flash-version product, some on-chip peripheral registers are not initialized by a reset exception; these registers are initialized only by the internal power-on reset signal that is generated at power-on. note 2 : in the mask-version product, some on-chip registers are not initialized by a reset exception caused by the wd t; these registers are initialized only by a reset exception via an external reset pin. tmp19a71 tmp19a71 7-3 7.4 nonmaskable interrupt (nmi) a nonmaskable interrupt (nmi) occurs when an external nmi pin is asserted as specified by the nmisen field of the clknmi register; the wdt counts to the nmi value; or the bus error area is accessed by a store access including dma transfer when modecr tmp19a71 handled by tx19a core automatically jump to the exception vector address read the cause.excode field to det ermine the cause of the exception get the address of the exce ption handler routine jump to the exception handler routine save relevant regi sters on the stack handled by user software exception handler routine (note 1) restore the saved regisers from the stack eret instruction return to the address where the exception occurred figure 7.5.1 general exception operati on (exce ptions other than reset or nmi) note 1 : general exceptions (i.e. exceptions other than reset exception or nmi) excluding trap, system call, and breakpoint exceptions indicate error conditions; they are normally handled by a reset routine. note 2 : for general exceptions (i.e. exceptions other than reset exception or nmi) excluding bus error excepti on (instruction fetch, data access), the pc value is stored in the epc register as the instruction that caused the exception. therefore, if the eret instruction is executed to resume execution from the saved pc address, the same exception may occur again. 7.6 debug exceptions debug exceptions include single-step and debug breakpoint exceptions. these exceptions are not normally used in user programs. also enabling the shadow register set will not be effective in debug exceptions. for a detailed description of debug ex c eption handling, refer to the chapter exception handling debug exception of the separate volume, tx19 core architecture . tmp19a71 7-4 tmp19a71 tmp19a71 7-5 7.7 maskable software interrupts the tmp19a71 provides two sources of maskable software interrupts (hereafter referred to as software interrupts). each software interrupt can be generated by setting the corresponding bit in the ip[1:0] field of the cp0 cause register. a software interrupt is accepted, at the fastest, 3 clock cycles after the ip[1:0] field of the cp0 caus e register is set. software interrupt requests are accepted when all the following conditions are met: ? the im [1:0] field of the cp0 st atus register is set to 1. ? the ie b it of the cp0 status register is set to 1. ? t he erl and exl bits of the cp0 status register are cleared to 0. each software interrupt can be masked by clea rin g the corresponding bit in the im[1:0] field of the cp0 status register. if a software interrupt and a hardware interrupt occur simultaneously, the hardware interrupt is given higher priority. upon software interrupts, when shadow register set is enabled, sscr tmp19a71 handled b y user software set cause.ip[1:0] to 1 to generate an interrupt handled b y tx19a core automatically jump to the exception vector address read cause.ip[1:0] to determine the cause of the interrupt clear cause.ip[1:0] to 0 to clear the interrupt jump to the interrupt handler interrupt handler routine save relevant regi sters on the stack handled b y user software restore the saved registers from the stack eret instruction return to the address where the interrupt occurred figure 7.7.1 example of softwre interrupt operation note: a software interrupt is accepted, at the fastest, 3 clock cycles after the interrupt is enabled, and the pc at this moment is stored in the epc register. tmp19a71 7-6 tmp19a71 tmp19a71 7-7 7.8 maskable hardware interrupts 7.8.1 features a maskable hardware interrupt (hereinafter referred to as hardware interrupt) is interrupt request of 47 sources that can set the seven interrupt levels of priority order individually with an interrupt controller (intc). hardware interrupt requests are accepted wh e n all the following conditions are met: ? the im [4:2] field of the cp0 st atus register is set to 1. ? the ie b it of the cp0 status register is set to 1. ? t he erl and exl bits of the cp0 status register are cleared to 0. if two or more interrupt occur simultaneously, in t errupt requests are accepted according to their priority levels. if interrupt requests of the same interrupt level occur simultaneously, the interrupt is accepted in ascending order starting with that of the smallest number (see table 7.8.1 ). when a hardware interrupt request is accepted, the exl bit of the cp0 status register is set to 1 to disa ble interrupts, and the cmask field of the ilev register is automatically updated to the interrupt level of the accepted interrupt request. the ie bit of the cp0 status register remains as has been set when an interrupt request is accepted. in hardware interrupts processing, each interrupt le vel is associated with a register ba nk called shadow register set. when an interrupt request is accepted, the register bank is switched to the one whose number is the same number of corresponding interrupt level. through this mechanism, there is no need for user program to save the general-purposed register (gpr) contents elsewhere upon interrupt response, thus a faster interrupt response is ensured. to use the shadow register set, the ssd bit of the cp0 sscr register must be cleared to 0. once an interrupt request is accepted, further interrupt requests can be nested by clearing the exl bit of the cp0 status register to 0 to enable interrupts. at this time, the cmask bit of the ilev register of intc is updated to the priority level whose interrupt request has been set, thus allows only interrupt requests with higher priority levels than the one it has been accepting. for details about interrupt nesting, refer to 7.8.9 setting example of nesting interrupt. using the cmask bit of the ilev register enables masking an interrupt request of lower prio rity level than the masking level to a programmable. all interrupt requests can be us ed for triggering dma transfer. detailed operation of hardware interrupts is prov ide d below. also, refer to the chapter exception handling maskable interrupts (interrupts) of the separate volume, tx19 core architecture . tmp19a71 tmp19a71 7-8 7.8.2 hardware interrupt sources table 7.8.1 hardware interrupt sources (1/2) interrupt number ivr[8 : 0] interrupt name interrupt source imr 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 0x000 0x004 0x008 0x00c 0x010 0x014 0x018 0x01c 0x020 0x024 0x028 0x02c 0x030 0x034 0x038 0x03c 0x040 0x044 0x048 0x04c 0x050 0x054 0x058 0x05c 0x060 0x064 0x068 0x06c 0x070 0x074 0x078 0x07c 0x080 0x084 0x088 0x08c 0x090 0x094 0x098 0x09c 0x0a0 0x0a4 0x0a8 0x0ac 0x0b0 0x0b4 0x0b8 0x0bc 0x0c0 0x0c4 0x0c8 0x0cc 0x0d0 0x0d4 0x0d8 0x0dc software set int0 reserved reserved reserved reserved int1 int2 int3 reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved intpmd0 intpmd1 intemg0 intemg1 intenc inttbcom00 inttbcom01 inttbcom10 inttbcom11 inttbcom20 inttbcom21 inttbcom30 inttbcom31 inttbe0 reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved inttx0 intrx0 inttx1 intrx1 inttx2 intrx2 inttx3 intrx3 set imr00.eim00 to 01 int0 pin --- --- --- --- int1 pin int2 pin int3 pin --- --- --- --- --- --- --- --- --- --- --- pmd0 count register (mdcnt0) match pmd1 count register (mdcnt1) match pmd0 emg input (pa6) pmd1 emg input (pb6) encoder match tb0reg0 match/tb0cnt overflow tb0reg1 match tb1reg0 match/tb1cnt overflow tb1reg1 match tb2reg0 match/tb2cnt overflow tb2reg1 match tb3reg0 match/tb3cnt overflow tb3reg1 match tmrb0 emg input (p93) --- --- --- --- --- --- --- --- --- --- --- --- --- --- uart0 transmit complete uart0 receive complete uart1 transmit complete uart1 receive complete sio2/uart2 transmit complete sio2/uart2 receive complete sio3/uart3 transmit complete sio3/uart3 receive complete imr00 (imr01) (imr02) (imr03) imr04 (imr05) (imr06) (imr07) imr08 (imr09) (imr10) (imr11) imr12 (imr13) (imr14) (imr15) imr16 (imr17) (imr18) (imr19) imr20 (imr21) (imr22) (imr23) imr24 (imr25) (imr26) (imr27) imr28 (imr29) (imr30) (imr31) imr32 (imr33) (imr34) (imr35) imr36 (imr37) (imr38) (imr39) imr40 (imr41) (imr42) (imr43) imr44 (imr45) (imr46) (imr47) imr48 (imr49) (imr50) (imr51) imr52 (imr53) (imr54) (imr55) tmp19a71 tmp19a71 7-9 table 7.8.2 hardware interrupt sources (2/2) interrupt number ivr[8 : 0] interrupt name interrupt source imr 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 0x0e0 0x0e4 0x0e8 0x0ec 0x0f0 0x0f4 0x0f8 0x0fc 0x100 0x104 0x108 0x10c 0x110 0x114 0x118 0x11c 0x120 0x124 0x128 0x12c 0x130 0x134 0x138 0x13c 0x140 0x144 0x148 0x14c 0x150 0x154 0x158 0x15c 0x160 0x164 0x168 0x16c 0x170 0x174 0x178 0x17c intdma0 intdma1 intdma2 intdma3 intdma4 intdma5 intdma6 intdma7 reserved reserved reserved reserved intad0 intadhp0 intadm0 intad1 intadhp1 intadm1 int4 int5 int6 int7 int8 int9 reserved reserved reserved reserved inttbcap00 inttbcap01 inttbcap10 inttbcap11 inttbcap20 inttbcap21 inttbcap30 inttbcap31 reserved reserved reserved reserved dma0 transfer complete dma1tranfer complete dma2 transfer complete dma3 transfer complete dma4 transfer complete dma5 transfer complete dma6 transfer complete dma7 transfer complete --- --- --- --- adc0 conversion complete adc0 highest-priority conversion complete adc0 conversion value compare adc1 conversion complete adc1 highest-priority conversion complete adc1 converson value compare int4 pin int5 pin int6 pin int7 pin int8 pin int9 pin --- --- --- --- tb0cap1 capture tb0cap0 capture tb1cap1 capture tb1cap0 capture tb2cap1 capture tb2cap0 capture tb3cap1 capture tb3cap0 capture --- --- --- --- imr56 (imr57) (imr58) (imr59) imr60 (imr61) (imr62) (imr63) imr64 (imr65) (imr66) (imr67) imr68 (imr69) (imr70) (imr71) imr72 (imr73) (imr74) (imr75) imr76 (imr77) (imr78) (imr79) imr80 (imr81) (imr82) (imr83) imr84 (imr85) (imr86) (imr87) imr88 (imr89) (imr90) (imr91) imr92 (imr93) (imr94) (imr95) note1: although imrxx is a 32-bit register, it is accessible by 8-bit or 16-bit one. i.e. making imr00 be imr00/imr01/imr02/imr03 enables 8-bit access. note2: reserved is a reserved area for expansion. it is recommended to set the same value as initial, ?0x00? to imr register of a reserved area. tmp19a71 7.8.3 detection of interrupt requests an interrupt request detection varies by a source as shown in table 7.8.3 . all interrupt requ ests, after being detected, are sent to the intc for priority arbitration and then sent to the tx19a core processor, as illustrated in figure 7.8.1 . for a detection level that can be used by each interrupt source, refer to table 7.8.5 . table 7.8.3 detecting part of interrupt request interrupt type detecting part interrupt notification route (1) external pin interrupt int0 to int3 cg portt cg (detection) intc (arbitration) tx19a core (2) external pin interrupt int4 to int9 intc port intc (detection/arbitration) tx19a core (3) emergency stop interrupt intemgx port pprt (detection) pmd intc (arbitration) tx19a core (4) emergency stop interrupt inttbe0 port port (detection) intc (arbitration) tx19a core (5) other interrupts intc peripheral hardware intc (detection/arbitration) tx19a core external pin interrupt int0 to int3 tx19a core cg intemgx pmd emg detection cir cuit (port) irc emergency stop interrupt intemgx/inttbe0 inttbe0 other interrupt figure 7.8.1 notification route of interrupt tmp19a71 7-10 tmp19a71 tmp19a71 7-11 7.8.4 interrupt arbitration 1. se ven levels of interrupt priority the intc can set seven levels of interrupt pr iority individually for each interrupt source. the ilxx field of the imrxx register is used to set priority of each interrupt source. the larger the number of interrupt level is set, the higher the priority becomes. when the value is ?000? (interrupt level = 0), the source does not eneble the interrupt. and, the source of an interrupt level 0 is not stored. 2. interru pt level notification when an interrupt request occurs, the intc compares the priority level of the request int errupt with the mask level set in the cmask field of the ilev register. when an interrupt request has a higher priority level than that of the mask level, the intc sends the interrupt request to the tx19a core processor. if two or more interrupt requests occur si multaneously, the intc sends the interrupt requ est in accordance with the established pr iorities. if two or more interrupt requests having the same priority level occur simultaneously, the intc sneds the interrupt request in ascending order starting from the smallest number (see table 7.8.1 ). if another interrupt request is made from th e same interrupt source before the previous interrupt request is cleared, the in tc ignores the second interrupt request. 3. intc regist er update when tx19a core accepts an interrupt request, its priority level is stored in the cm ask field of the ilev register and the corresponding vector value is set to the ivr register. cmask/ivr once set is not updated until ivr is read or sent to the core even though an interrupt request of higher level occurs. note: before changing the ilev value, be sure to read the ivr value. if the ilev value is changed without reading the ivr value, an unexpected interrupt may occur. 7.8.5 hardware interrupt operation when a hardware interrupt is generated, tx 19a core performs the following operations and a control jumps to the exception vector address according to the bev bit of the cp0 status register and the iv bit of the cp0 cause register (see table 7.2.1 ). 1. t he exl bit of the cp0 status register is set to 1. 2. the pc va lue upon an interrupt generation is stored in the cp0 epc register. 3. whe n shadow register set is enabled (cp0 register sscr tmp19a71 when an interrupt occurs, automatically jump to the corresponding exc epti o n v ect o r addr ess read ivr to generate an interrupt vector address handled b y tx19a core handled b y user software clear the interrupt source in iclr read the interrupt handler address from the interrupt vector jump to the interrupt handler interrupt handler routine set ilev.mlev=0 to restore the mask level save relevant registers on the stack (note) restore the saved register s from the stack (note) eret instruction return to the address where the interrupt occurred figure 7.8.4 basic operation sample of hardware interrupt note: tx19a core can automatically save the most part of a general-purposed register by using shadow register set (cp0 register sscr tmp19a71 tmp19a71 7-13 7.8.6 interrupt initial settings in section 7.8.6.1, the initial settings commo n to all interrupts rega rdless of sources and in section 7.8.6.2, the initial settings specific to each interrupt source are described, both as necessary settings be fore using interrupts. 7.8.6.1 initial settings common to all interrupts the following settings must be made in order to use interrupts. 1. set th e im[4:2] field of the cp0 status register to 111. 2. set the bas e address of the interrupt vector table in bits 9 to 31 of the intc ivr register. 3. set an int errupt handler address for a respec tive interrupt source to the address, the sum of a base address of interrupt vector table and ivr[8:0] by interrupt source. programming example for the above 1.: us ing exeption vector address 0xbfc00400 lui r2,0x1040 ; cu0=1 ,bev =1 (r2 =0x1040_xxxx) addiu r2,r2,0x1c00 ; im4,im3,im2 =1 (r2 =0x1040_1c00) mtc0 r2,r12 programming example for the above 2.: using vectort able as a label of the interrupt vector table lui r3,hi(vectortable) addiu r3,r3,lo(vectortable) ; r3 = vectortable address lui r2,hi(ivr) ; r2 =0xff ff_xxxx (upper 16 bits of address in ivr) sw r3,lo(ivr)(r2) ; set vectortable address in ivr[31:9] programing example for the above 3.: using address 0xbfc20000 as a base address of the interrupt vector table _vectortable section code isa32 abs=0xbfc20000 vectortable: dw _swint ; 0 -- - software interrupt dw _int0 ; 1 -- - int0 dw _researved ; 2 --- reserved dw _researved ; 3 --- reserved dw _researved ; 4 --- reserved dw _researved ; 5 --- reserved dw _int1 ; 6 -- - int1 dw _int2 ; 7 -- - int2 dw _int3 ; 8 -- - int3 dw _researved ; 9 --- reserved note: these examples assume the use of a toshiba assembler. when using a third-party assembler, modify them as necessar y to avoid syntax errors. tmp19a71 tmp19a71 7-14 7.8.6.2 initial settings specific to each interrupt source the registers that must be set for using an interrupt varies by sources shown below: table 7.8.5 interrupt detection and setting register interrupt type setting regiser support ed int errupt sensitivity settings (1) external pin interrupts int0 to int3 pxier (port) pxfr (port) clkintx (cg) imrxx (intc) programmable as low level, high level, falling edge, or rising edge sensitive through the ixsen field of the clkintx register in the cg. in the intc, the eimxx field of the imrxx register must be set to falling edge or low level according to the setting made in the cg. (2) external pin interrupts int4 to int9 pxier (port) pxfr (port) imrxx (intc) programmable as low level, high level, falling edge, or rising edge sensitive through the eimxx field o f the imrxx register in the intc. (3) emergency stop interrupts intemgx pxier (port) pxfr (port) pxecr (port) emgcrx (pmd) imrxx (intc) programmable as low level, high level, falling edge, or rising edge sensitive through the erm x field of the pxecr register in the port unit. in the intc, the eimxx field of the imrxx register must be set to falling edge. (4) emergency stop interrupt inttbe0 p9ier (port) p9fr2 (port) p9ecr (port) imr33 (intc) programmable as low level, high level, falling edge, or rising edge sensitive through the erm9 field of t he p9ecr r egister in the port unit. in the intc, the eim33 field of the imr33 register must be set to falling edge or low level. (5) other interrupts imrxx (intc) must always be set as falling edge sensitive. note: in level detection, a value is checked at internal clock timing each time. an edge is detected by comparing a previous value with a current value at internal clock timing. 1. ext ernal pin interrupts, int0 to int3 ? in the p ort unit, set the pxier register to enable input (see 7. port function). ? in the p ort unit, set int0 to int3 as the pin function to the pxfr register (see 7. port function). ? in the cg, set interrupt sensitivity in the ixsen field of the clkintx register (see 5.3.3 interrupt registers). ? in the cg, set enable/disable of standby cancel in the ixki bit of the clkintx register (see 5.3.3 interrupt registers). ? in the int c, set the eimxx field of the imrxx register to specify the sensitivity of the interrupt signal sent from the cg. when rising/falling edge is selected in the clkintx.ixsen, set 10 to the imrxx.eimxx to select falling edge. when high/low level is selected in the clkintx.ixsen, set 00 to the imrxx.eimxx to select low level (see 7.8.10 register ). note 1: to write to the clkintx register, it is necessary to write 0x5a5a and then 0xf0f0 in the cgact register. note 2: to initialize an interrupt, follow the interrupt detection route indicated in table 7.8.3 and make the interrupt enable with the cp0 register. if any different setting order is used, an unexpected interrupt may be generated. so, be sure to clear interrupt sources before setting inte rrupt enable. similarly, to disable an interrupt, make the interrupt disable with the cp0 register and then set the registers accordingly in the reverse order of interrupt detection route. tmp19a71 tmp19a71 7-15 ? setting example: using the external pin interrupt int3 for waking up from stop mode (rising edge) status tmp19a71 tmp19a71 7-16 3. interrupt halted, intemg0/intemg1 for detailed setting example, refer to the section 7.12 usage note of emg input pin (p a6/pb6). ? i n the port unit, set the ermx field of pxecr register to be sensitive (see 7. port function). ? in the p ort unit, set input enable to the pxier register (see 7. port function). ? in the port unit, set emgx to the pin f unction of pxfr register (see 7. port function). ? in the pmd, set 1 to the emgen field of the emgcrx register (see 12.3.4 emg protection circuit). ? set 10 t o imrxx tmp19a71 tmp19a71 7-17 7.8.7 enabling/disabling interrupts here, it is described the procedure of enabling and disabling of interrupt being programmed. 7.8.7.1 enabling interrupts to enable interrupts, all the following three cond itions must be satisfie d in addition to the settings described in 7.8.6 interrupt initial settings : ? t he erl bit of the cp0 status register is cleared to 0. ? t he exl bit of the cp0 status register is cleared to 0. ? the ie b it of the cp0 status register is set to 1. when an instruction which makes these settings is executed, interrupts are enabled and the reg ister setting takes effect after two clock cycles. the ie bit of the cp0 status register can be set to 1 in the following four ways: ? set the i e bit of the cp0 status register to 1 using the mtc0 instruction of 32-bit isa. ? set the cp0 ie r register to a value other than 0 using the mtc0 instruction of 32-bit isa (see note 1.) ? set the i e bit of the cp0 status register to 1 using the mtc0 instruction of 16-bit isa. ? ex ecute the ei instruction of 16-bit isa (see note 2.) note 1: it is recommended to use this measure when enabling an interrupt for 32-bit isa because of the code efficiency. in toshiba?s c compiler, too, this instruction is executed for __ei() intrinsic function of 32-bit isa. note 2: it is recommended to use this measure when enabling an interrupt for 16-bit isa because of the code efficie ncy. in toshiba?s c compiler, too, this instruction is executed for __ei() intrinsic function of 16-bit isa. note 3: of the above four methods, we recommend using the second or fourth because of smaller code size and faster exe cution. tmp19a71 tmp19a71 7-18 7.8.7.2 disabling interrupts interrupts are disabled if any of the following three conditions is satisfied. when interrupts are disabled in this way, interrupt requests from interrupt sources that have been enabled in the initial setting (see 7.8.6 interrupt initial settings ) remain pending. note that the tmp19a71 does not latch int errupt requests from interrupt sources whose level is set to 0. ? t he erl bit of the cp0 status register is set to 1. ? t he exl bit of the cp0 status register is set to 1. ? t he ie bit of the cp0 status register is cleared to 0. execution of an instruction which makes these settings immediately disables interrupts and the reg ister setting takes effect after two clock cycles. the erl and exl bits of the cp0 status registrer are automatically set when an interru pt or exception occurs, and are automatically cleared when the eret instruction is executed. therefore, for disabling interrupts, we recommend using the third method, i.e., clearing the ie bit of the cp0 status register to 0. for how to disable interrupts when interrupt nesting is used, see 7.8.9 setting example of nesting interrupt . the ie bit of th e cp0 status register can be cleared to 0 in the following four ways: ? cl ear the ie bit of the cp0 status register to 0 using the mtc0 instruction of 32-bit isa. ? cl ear the cp0 ier register to 0 using the mtc0 istruction of 32-bit isa (see note 1). ? cl ear the ie bit of the cp0 status register to 0 using the mtc0 instruction of 16-bit isa. ? ex ecute the di instruction of 16-bit isa (see note 2). note 1: it is recommended to use this measure when disabling an interrupt for 32-bit isa because of the code efficiency. in toshiba?s c compiler, too, this instruction is executed for __di() intrinsic function of 32-bit isa. note 2: it is recommended to use this measure when disabling an interrupt for 16-bit isa because of the code efficie ncy. in toshiba?s c compiler, too, this instruction is executed for __di() intrinsic function of 16-bit isa. note 3: of the above four methods, we recommend using the second or fourth because of smaller code size and faster exe cution. to disable individual source of interrupt that ha s been enabled once after its level is set with imrxx tmp19a71 tmp19a71 7-19 7.8.8 interrupt handling here, the detailed operation is described based on the basic flow of figure 7.8.4 . 7.8.8.1 interrupt respon se and restore 1. interrupt accepted by hardware after an interrupt request arbitration, intc se ts t he interrupt vector and interrupt level of the interrupt request accepted to ivr and ilev tmp19a71 ? set 1 to cause tmp19a71 tmp19a71 7-21 2. process necessary for exception handler after an interrupt request is accepted, it au toma tically jumps to the exception handler in which the interrupt vector address is read from intc ivr, and the user program generates the address of the interrupt handler. as in the example statements presented in section 7.8.6 interrupt initial setting, an interrupt vector base address is set in the range of ivr[31:8], thus the ivr value becomes the interrupt vector address. after reading the intc ivr value, an interrupt so urce is clear ed. if the interrupt source is cleared before ivr is read, no correct value can be read because the ivr value is also cleared. programming example of exception handlers: when ex ception vector address (interrupt) is 0xbfc0_0400 vector_int section code isa32 abs=0xbfc00400 __interruptvector: lui r26,hi(ivr) lw r26,lo(ivr)(r26) ; read inter rupt vector address from ivr lui r27,hi(iclr) sh r26,lo(iclr)(r27) ; clear interr upt request lw r26,0(r26) ; read inter rupt handler address from interrupt vector jr r26 ; jump to interru pt handler nop note 1: this programming example is of the case toshiba?s assembler is used. when the third-party assembler is used, s yntax error may occur. program should be changed according to an assembler to use. 3. process necessary for interrupt handler typical tasks of the interrupt handler are to save appropriate registers and to process interrupts. if the sha dow register set is enabled (cp0 register sscr tmp19a71 tmp19a71 7-22 setting example necessary for interrupt handler sscr save on the stack ; saving sscr values (as appropriate) epc save on the stack ; saving epc values (as appropriate) status save on the stack ; saving status values (as appropriate) nop instruction ; s tall before the execution of eret instruction nop instruction ; s tall before the execution of eret instruction status tmp19a71 tmp19a71 7-23 7.8.9 setting example of nesting interrupt nesting interrupt is the processing of the interrupt request of higher priority during the processing of some ot her interrupts. tmp19a71 can perform nesting interrupt because intc arbitrates the priority of interrupts. when an interrupt request is accepted, ilev tmp19a71 status tmp19a71 tmp19a71 7-25 7.8.10 register 7.8.10.1 register map table 7.8.6 intc register map address mnemonic register name corresponding interrupt number 0xffff_d000 imr00 interrupt mode control register 00 0 - 3 0xffff_d004 imr04 interrupt mode control register 04 4 - 7 0xffff_d008 imr08 interrupt mode control register 08 8 - 11 0xffff_d00c imr12 interrupt mode control register 12 12 - 15 0xffff_d010 imr16 interrupt mode control register 16 16 - 19 0xffff_d014 imr20 interrupt mode control register 20 20 - 23 0xffff_d018 imr24 interrupt mode control register 24 24 - 27 0xffff_d01c imr28 interrupt mode control register 28 28 - 31 0xffff_d020 imr32 interrupt mode control register 32 32 - 35 0xffff_d024 imr36 interrupt mode control register 36 36 - 39 0xffff_d028 imr40 interrupt mode control register 40 40 - 43 0xffff_d02c imr44 interrupt mode control register 44 44 - 47 0xffff_d030 imr48 interrupt mode control register 48 48 - 51 0xffff_d034 imr52 interrupt mode control register 52 52 - 55 0xffff_d038 imr56 interrupt mode control register 56 56 - 59 0xffff_d03c imr60 interrupt mode control register 60 60 - 63 0xffff_d040 imr64 interrupt mode control register 64 64 - 67 0xffff_d044 imr68 interrupt mode control register 68 68 - 71 0xffff_d048 imr72 interrupt mode control register 72 72 - 75 0xffff_d04c imr76 interrupt mode control register 76 76 - 79 0xffff_d050 imr80 interrupt mode control register 80 80 - 83 0xffff_d054 imr84 interrupt mode control register 84 84 - 87 0xffff_d058 imr88 interrupt mode control register 88 88 - 91 0xffff_d05c imr92 interrupt mode control register 92 92 - 95 0xffff_d080 ivr interrupt vector register all (0 - 95) 0xffff_d084 iclr interrupt request clear register all (0 - 95) 0xffff_d088 ilev interrupt mask level register all (0 - 95) note 1: while an interrupt mode control register (imrxx) is 32-bit register, it is accesible by 16-bit and 8-bit ones. note 2: the interrupt number to which reserved is set in table 7.8.1 hardware interrupt sources is a reserved area for exp ansion. 0, the same value as initial value shall be set to interrupt mode control registers (imrxx) of relevant interrupt number. tmp19a71 tmp19a71 7-26 7.8.10.2 interrupt vector register (ivr) ivr is the register indicating an interrupt vector address of interrupt source generated. when an interrupt request is accepted, the correspon din g values to table 7. 8.1 is set to ivr[8:2]. ivr[31:9] are the bits readable and writable. by setting a base address of interrupt vecter, an interrupt vector address can be gene rated easily only by reading ivr. interrupt vector register 7 6 5 4 3 2 1 0 ivr bit symbol ivr7 ivr6 ivr5 ivr4 ivr3 ivr2 (0xffff_d080) read/write r reset value 0 0 0 0 0 0 0 0 function a vector of interrupt source being generated is set. 15 14 13 12 11 10 9 8 bit sy mbol ivr8 read/write r/w r reset value 0 0 0 0 0 0 0 0 function a vector of interrupt source being generate d is set. 23 22 21 20 19 18 17 16 bit sy mbol read/write r/w reset value 0 0 0 0 0 0 0 0 function 31 30 29 28 27 26 25 24 bit sy mbol read/write r/w reset value 0 0 0 0 0 0 0 0 function tmp19a71 7.8.10.3 interrupt level register (ilev) ilev is the register that controls a level no t ifying interrupt requests fromintc to tx19a processor core. those under the interrupt level ilev tmp19a71 tmp19a71 7-28 7.8.10.4 interrupt mode control registers (imrxx) imrxx consists of: tmp19a71 tmp19a71 7-29 interrupt mode control registers 7 6 5 4 3 2 1 0 imr04 bit sy mbol D D D D D (0xffff_d004) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 15 14 13 12 11 10 9 8 (imr05) bit sy mbol D D D D D (0xffff_d005) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 23 22 21 20 19 18 17 16 (imr06) bit sy mbol D eim06 dm06 D il06 (0xffff_d006) read/write r r/w r r/w reset value 0 00 0 0 000 function sensitivity of interrupt requests is set. when sensitivity in cg is edge, 10 shall be set, and when is level, 00 shall be set. dmac trigger 0: disable 1: enable interrupt number 6 as dmac trigger when dm06 = 0 interrupt number 6 (int1) priority level 000: interrupt disabled 001-111: 1-7 when dm06 = 1 dmac channel select 000-111: 0-7 31 30 29 28 27 26 25 24 (imr07) bit sy mbol D eim07 dm07 D il07 (0xffff_d007) read/write r r/w r r/w reset value 0 00 0 0 000 function sensitivity of interrupt requests is set. when sensitivity in cg is edge, 10 shall be set, and when is level, 00 shall be set. dmac trigger 0:disable 1: enable interrupt number 7 as dmac trigger when dm07 = 0 interrupt numb er 7 (int2) priority level 000: interrupt disabled 001-111: 1-7 when dm07 = 1 dmac channel select 000-111: 0-7 tmp19a71 tmp19a71 7-30 interrupt mode control registers 7 6 5 4 3 2 1 0 imr08 bit symbol D eim08 dm08 D il08 (0xffff_d008) read/write r r/w r r/w reset value 0 00 0 0 000 function sensitivity of interrupt requests is set. when sensitivity in cg is edge, 10 shall be set, and when is level, 00 shall be set. dmac trigger 0: disable 1:enable interrupt number 8 as dmac trigger when dm08 = 0 interrupt numb er 8 (int3) priority level 000: interrupt disabled 001-111: 1-7 dm08 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr09) bit sy mbol D D D D D (0xffff_d009) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 23 22 21 20 19 18 17 16 (imr10) bit sy mbol D D D D D (0xffff_d00a) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 31 30 29 28 27 26 25 24 (imr11) bit sy mbol D D D D D (0xffff_d00b) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. tmp19a71 tmp19a71 7-31 interrupt mode control registers 7 6 5 4 3 2 1 0 imr12 bit sy mbol D D D D D (0xffff_d00c) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 15 14 13 12 11 10 9 8 (imr13) bit sy mbol D D D D D (0xffff_d00d) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 23 22 21 20 19 18 17 16 (imr14) bit sy mbol D D D D D (0xffff_d00e) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 31 30 29 28 27 26 25 24 (imr15) bit sy mbol D D D D D (0xffff_d00f) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. tmp19a71 tmp19a71 7-32 interrupt mode control registers 7 6 5 4 3 2 1 0 imr16 bit sy mbol D D D D D (0xffff_d010) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 15 14 13 12 11 10 9 8 (imr17) bit sy mbol D D D D D (0xffff_d011) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 23 22 21 20 19 18 17 16 (imr18) bit sy mbol D D D D D (0xffff_d012) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 31 30 29 28 27 26 25 24 (imr19) bit sy mbol D D D D D (0xffff_d013) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. tmp19a71 tmp19a71 7-33 interrupt mode control registers 7 6 5 4 3 2 1 0 imr20 bit sy mbol D eim20 dm20 D il20 (0xffff_d014) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0:disable 1: enable interrupt number 20 as dmac trigger when dm20 = 0 interrupt numb er 20 (intpmd0) priority level 000: interrupt disabled 001-111: 1-7 when dm20 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr21) git s ymbol D eim21 dm21 D il21 (0xffff_d015) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 21 as dmac trigger when dm21 = 0 interrupt numb er 21 (intpmd1) priority level 000: interrupt disabled 001-111: 1-7 when dm21 = 1 dmac channel select 000-111: 0-7 23 22 21 20 19 18 17 16 (imr22) bit sy mbol D eim22 dm22 D il22 (0xffff_d016) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0:disable 1: enable interrupt number 22 as dmac trigger when dm22 = 0 interrupt numb er 22 (intemg0) priority level 000: interrup t disabled 001-111: 1-7 when dm22 = 1 dmac channel select 000-111: 0-7 31 30 29 28 27 26 25 24 (imr23) bit sy mbol D eim23 dm23 D il23 (0xffff_d017) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 23 as dmac trigger when dm23 = 0 interrupt num ber 23 (intemg0) priority level 000: interrupt disabled 001-111: 1-7 when dm23 = 1 dmac channel select 000-111: 0-7 tmp19a71 tmp19a71 7-34 interrupt mode control registers 7 6 5 4 3 2 1 0 imr24 bit sy mbol D eim24 dm24 D il24 (0xffff_d018) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 24 as dmac trigger when dm24 = 0 interrupt numb er 24 (intenc) priority level 000: interrupt disabled 001-111: 1-7 when dm24 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr25) bit sy mbol D eim25 dm25 D il25 (0xffff_d019) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 25 as dmac trigger when dm25 = 0 interrupt number 25 ( inttbcom00) priority level 000: interrupt disabled 001-111: 1-7 when dm25 = 1 dmac channel select 000-111: 0-7 23 22 21 20 19 18 17 16 (imr26) bit sy mbol D eim26 dm26 D il26 (0xffff_d01a) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 26 as dmac trigger when dm26 = 0 interrupt number 26 (inttbcom01) priority level 000: interrup t disabled 001-111: 1-7 when dm26 = 1 dmac channel select 000-111: 0-7 31 30 29 28 27 26 25 24 (imr27) bit sy mbol D eim27 dm27 D il27 (0xffff_d01b) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable intrrupt number 27 as dmac trigger when dm27 = 0 interrupt numb er 27 (inttbcom10) priority level 000: interrupt disabled 001-111: 1-7 when dm27 = 1 dmac channel select 000-111: 0-7 tmp19a71 tmp19a71 7-35 interrupt mode control registers 7 6 5 4 3 2 1 0 imr28 bit sy mbol D eim28 dm28 D il28 (0xffff_d01c) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable intrrupt number 28 as dmac trigger when dm28 = 0 interrupt numb er 28 (inttbcom11) priority level 000: interrupt disabled 001-111: 1-7 when dm28 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr29) bit sy mbol D eim29 dm29 D il29 (0xffff_d01d) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 29 as dmac trigger when dm29 = 0 interrupt numb er 29 (inttbcom20) priority level 000: interrupt disabled 001-111: 1-7 when dm29 = 1 dmac channel select 000-111: 0-7 23 22 21 20 19 18 17 16 (imr30) bit sy mbol D eim30 dm30 D il30 (0xffff_d01e) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 30 as dmac trigger when dm30 = 0 interrupt numb er 30 (inttbcom21) priority level 000: interrupt disabled 001-111: 1-7 when dm30 = 1 dmac channel select 000-111: 0-7 31 30 29 28 27 26 25 24 (imr31) bit sy mbol D eim31 dm31 D il31 (0xffff_d01f) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 31 as dmac trigger when dm31 = 0 interrupt numb er 31 (inttbcom30) priority level 000: interrupt disabled 001-111: 1-7 when dm31 = 1 dmac channel select 000-111: 0-7 tmp19a71 tmp19a71 7-36 interrupt mode control registers 7 6 5 4 3 2 1 0 imr32 bit sy mbol D eim32 dm32 D il32 (0xffff_d020) read/write r r/w r r/w reset value 0 00 0 0 000 funcion set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 32 as dmac trigger when dm32 = 0 interrupt numb er 32 (inttbcom31) priority level 000: interrup t disabled 001-111: 1-7 when dm32 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr33) bit sy mbol D eim33 dm33 D il33 (0xffff_d021) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 33 as dmac trigger when dm33 = 0 interrupt num ber (inttbe0) priority level 000: interrupt disabled 001-111: 1-7 when dm33 = 1 dmac channel select 000-111: 0-7 23 22 21 20 19 18 17 16 (imr34) bit sy mbol D D D D D (0xffff_d022) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 31 30 29 28 27 26 25 24 (imr35) bit sy mbol D D D D D (0xffff_d023) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000 tmp19a71 tmp19a71 7-37 interrupt mode control registers 7 6 5 4 3 2 1 0 imr36 bit sy mbol D D D D D (0xffff_d024) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 15 14 13 12 11 10 9 8 (imr37) bit sy mbol D D D D D (0xffff_d025) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 23 22 21 20 19 18 17 16 (imr38) bit sy mbol D D D D D (0xffff_d026) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 31 30 29 28 27 26 25 24 (imr39) bit sy mbol D D D D D (0xffff_d027) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. tmp19a71 tmp19a71 7-38 interrupt mode control registers 7 6 5 4 3 2 1 0 imr40 bit sy mbol D D D D D (0xffff_d028) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 15 14 13 12 11 10 9 8 (imr41) bit sy mbol D D D D D (0xffff_d029) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 23 22 21 20 19 18 17 16 (imr42) bit sy mbol D D D D D (0xffff_d02a) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 31 30 29 28 27 26 25 24 (imr43) bit sy mbol D D D D D (0xffff_d02b) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. tmp19a71 tmp19a71 7-39 interrupt mode control registers 7 6 5 4 3 2 1 0 imr44 bit sy mbol D D D D D (0xffff_d02c) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 15 14 13 12 11 10 9 8 (imr45) bit sy mbol D D D D D (0xffff_d02d) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 23 22 21 20 19 18 17 16 (imr46) bit sy mbol D D D D D (0xffff_d02e) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 31 30 29 28 27 26 25 24 (imr47) bit sy mbol D D D D D (0xffff_d02f) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. tmp19a71 tmp19a71 7-40 interrupt mode control registers 7 6 5 4 3 2 1 0 imr48 bit sy mbol D eim48 dm48 D il48 (0xffff_d030) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 48 as dmac trigger when dm48 = 0 intrrupt numbe r 48 (inttx0) priority level 000: interrupt disabled 001-111: 1-7 when dm48 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr49) bit sy mbol D eim49 dm49 D il49 (0xffff_d031) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 49 as dmac trigger when dm49 = 0 interrupt numb er 49(intrx0) priority level 000: interrupt disabled 001-111: 1-7 when dm49 = 1 dmac channel select 000-111: 0-7 23 22 21 20 19 18 17 16 (imr50) bit sy mbol D eim50 dm50 D il50 (0xffff_d032) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 50 as dmac trigger when dm50 = 0 interrupt numb er 50 (inttx1) priority level 000: interrupt disabled 001-111: 1-7 when dm50 = 1 dmac channel select 000-111: 0-7 31 30 29 28 27 26 25 24 (imr51) bit sy mbol D eim51 dm51 D il51 (0xffff_d033) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 51 as dmac trigger when dm51 = 0 interrupt numb er 51(intrx1) priority level 000: interrupt disabled 001-111: 1-7 when dm51 = 1 dmac channel select 000-111: 0-7 tmp19a71 tmp19a71 7-41 interrupt mode control registers 7 6 5 4 3 2 1 0 imr52 bit sy mbol D eim52 dm52 D il52 (0xffff_d034) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 52 as dmac trigger when dm52 = 0 intrrupt numbe r 52 (inttx2) priority level 000: interrupt disabled 001-111: 1-7 when dm52 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr53) bit sy mbol D eim53 dm53 D il53 (0xffff_d035) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 53 as dmac trigger when dm53 = 0 interrupt numb er 53 (intrx2) priority level 000: interrupt disabled 001-111: 1-7 when dm53 = dmac channel select 000-111: 0-7 23 22 21 20 19 18 17 16 (imr54) bit sy mbol D eim54 dm54 D il54 (0xffff_d036) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 54 as dmac trigger when dm54 = 0 interrupt numb er 54 (inttx3) priority level 000: interrupt disabled 001-111: 1-7 when dm54 = 1 dmac channel select 000-111: 0-7 31 30 29 28 27 26 25 24 (imr55) bit sy mbol D eim55 dm55 D il55 (0xffff_d037) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 55 as dmac trigger when dm55 = 0 interrupt numb er 55 (intrx3) priority level 000: interrupt disabled 001-111: 1-7 when dm55 = 1 dmac channel select 000-111: 0-7 tmp19a71 tmp19a71 7-42 interrupt mode control registers 7 6 5 4 3 2 1 0 imr56 bit sy mbol D eim56 dm56 D il56 (0xffff_d038) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 56 as dmac trigger when dm56 = 0 interrupt num ber 56 (intdma0) peiority level 000: interrupt disabled 001-111: 1-7 when dm56 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr57) bit sy mbol D eim57 dm57 D il57 (0xffff_d039) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 57 as dmac trigger when dm57 = 0 interrupt num ber 57 (intdma1) priority level 000: interrupt disabled 001-111: 1-7 when dm57 = 1 dmac channel select 000-111: 0-7 23 22 21 20 19 18 17 16 (imr58) bit sy mbol D eim58 dm58 D il58 (0xffff_d03a) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 58 as dmac trigger when dm58 = 0 interrupt numb er 58 intdma2 priority level 000: interrupt disabled 001-111: 1-7 when dm58 = 1 dmac channel select 000-111: 0-7 31 30 29 28 27 26 25 24 (imr59) bit sy mbol D eim59 dm59 D il59 (0xffff_d03b) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 59 as dmac trigger when dm59 = 0 interrupt num ber 59 (intdma3) priority level 000: interrupt disabled 001-111: 1-7 when dm59 = 1 dmac channel select 000-111: 0-7 tmp19a71 tmp19a71 7-43 interrupt mode control registers 7 6 5 4 3 2 1 0 imr60 bit sy mbol D eim60 dm60 D il60 (0xffff_d03c) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 60 as dmac trigger when dm60 = 0 interrupt num ber 60 (intdma4) priority level 000: interrupt disabled 001-111: 1-7 when dm60 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr61) bit sy mbol D eim61 dm61 D il61 (0xffff_d03d) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 61 as dmac trigger when dm61 = 0 interrupt numb er 61(intdma5) priority level 000: interrupt disabled 001-111: 1-7 when dm61 = 1 dmac channel select 000-111: 0-7 23 22 21 20 19 18 17 16 (imr62) bit sy mbol D eim62 dm62 D il62 (0xffff_d03e) read/write r r/w r r/w reset value 0 00 0 0 000 funcion set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 62 as dmac trigger when dm62 = 0 interrupt number 62 (intdma6) pr iority level 000: interrupt disabled 001-111: 1-7 when dm62 = 1 dmac channel select 000-111: 0-7 31 30 29 28 27 26 25 24 (imr63) bit sy mbol D eim63 dm63 D il63 (0xffff_d03f) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 63 as dmac trigger when dm63 = 0 interrupt numb er 63 (intdma7) priority level 000: interrupt disabled 001-111: 1-7 when dm63 = 1 dmac channel select 000-111: 0-7 tmp19a71 tmp19a71 7-44 interrupt mode control registers 7 6 5 4 3 2 1 0 imr64 bit sy mbol D D D D D (0xffff_d040) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 15 14 13 12 11 10 9 8 (imr65) bit sy mbol D D D D D (0xffff_d041) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 23 22 21 20 19 18 17 16 (imr66) bit sy mbol D D D D D (0xffff_d042) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0 must be set as 000. 31 30 29 28 27 26 25 24 (imr67) bit sy mbol D D D D D (0xffff_d043) read/write r r/w r r/w reset vaue 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. tmp19a71 tmp19a71 7-45 interrupt mode control registers 7 6 5 4 3 2 1 0 imr68 bit symbol D eim68 dm68 D il68 (0xffff_d044) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 68 as dmac trigger when dm68 = 0 interrupt numb er 68 (intad0) interrupt level 000: interrupt disabled 001-111: 1-7 when dm68 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr69) bit sy mbol D eim69 dm69 D il69 (0xffff_d045) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 69 as dmac trigger when dm69 = 0 interrupt numb er 69 (intadhp0) priority level 000: interrupt disable 001-111: 1-7 when dm69 = 1 dmac channel select 000-111: 0-7 23 22 21 20 19 18 17 16 (imr70) bit sy mbol D ei70 dm70 D il70 (0xffff_d046) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 70 as dmac trigger when dm70 = 0 interrupt numb er 70 (intadm0) peiority level 000: interrupt disabled 001-111: 1-7 when dm70 = 1 dmac channel select 000-111: 0-7 31 30 29 28 27 26 25 24 (imr71) bit sy mbol D eim71 dm71 D il71 (0xffff_d047) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 71 as dmac trigger when dm71 = 0 interrupt numb er 71 (intad1) priority level 000: interrupt disabled 001-111: 1-7 when dm71 = 1 dmac channel select 000-111: 0-7 tmp19a71 tmp19a71 7-46 interrupt mode control registers 7 6 5 4 3 2 1 0 imr72 bit sy mbol D eim72 dm72 D il72 (0xffff_d048) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 72 as dmac trigger when dm72 = 0 interrupt numb er 72 (intadhp1) priority level 000: interrupt disabled 001-111: 1-7 when dm72 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr73) bit sy mbol D eim73 dm73 D il73 (0xffff_d049) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1:enable interrupt number 73 as dmac trigger when dm73 = 0 interrupt num ber 73 (intadm1) priority level 000: interrup t disabled 001-111: 1-7 when dm73 = 1 dmac channel select 000-111: 0-7 23 22 21 20 19 18 17 16 (imr74) bit sy mbol D ei74 dm74 D il74 (0xffff_d04a) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 00: level ?l? 01: level ?h? 10: rising edge 11: falling edge dmac trigger 0: disable 1: enable interrupt number 74 as dmac trigger when dm74 = 0 interrupt number 74 (int4) priority level 000: interrupt disabled 001-111: 1 1- 7 when dm74 = 1 dmac channel select 000-111: 0-7 31 30 29 28 27 26 25 24 (imr75) bit sy mbol D eim75 dm75 D il75 (0xffff_d04b) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 00: level ?l? 01: level ?h? 10: rising edge 11: falling edge dmac trigger 0: disable 1: enable interrupt number 75 as dmac trigger when dm75 = 0 interr upt number 75 (int5) priority level 000: interrupt disabled 001-111: 1-7 when dm75 = 1 dmac channel select 000-111: 0-7 tmp19a71 tmp19a71 7-47 interrupt mode control registers 7 6 5 4 3 2 1 0 imr76 bit sy mbol D ei76 dm76 D il76 (0xffff_d04c) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 00: level ?l? 01: level ?h? 10: rising edge 11: falling edge dmac trigger 0: disable 1: enable interrupt number 76 as dmac trigger when dm76 = 0 interrupt numbe r 76 (int6) priority level 000: interrupt disabled 001-111: 1-7 when dm76 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr77) bit sy mbol D ei77 dm77 D il77 (0xffff_d04d) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 00: level ?l? 01: level ?h? 10: rising edge 11: falling edge dmac trigger 0:disable 1: enable interrupt number 77 as dmac trigger when dm77 = 0 interrupt number 77 (int7) priorityl evel 000: interrupt disabled 001-111: 1-7 when dm77 = 1 dmac channel select 000-111: 0-7 23 22 21 20 19 18 17 16 (imr78) bit sy mbol D ei78 dm78 D il78 (0xffff_d04e) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 00: level ?l? 01: level ?h? 10: rising edge 11: falling edge dmac trigger 0: disable 1: enable interrupt number 78 as dmac trigger when dm78 = 0 interrupt number 78 (int8) priority level 000: interrupt disabled 001-111: 1-7 when dm78 = 1 dmac channel select 000-111: 0-7 31 30 29 28 27 26 25 24 (imr79) bit sy mbol D ei79 dm79 D il79 (0xffff_d04f) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 00: level ?l? 01: level ?h? 10: rising edge 11: falling edge dmac trigger 0: disable 1: enable interrupt number 79 as dmac trigger when dm79 = 0 interrupt numbe r 79 (int9) priority level 000: interrupt disabled 001-111: 1-7 when dm79 = 1 dmac channel select 000-111: 0-7 tmp19a71 tmp19a71 7-48 interrupt mode control registers 7 6 5 4 3 2 1 0 imr80 bit sy mbol D D D D D (0xffff_d050) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 15 14 13 12 11 10 9 8 (imr81) bit sy mbol D D D D D (0xffff_d051) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 23 22 21 20 19 18 17 16 (imr82) bit sy mbol D D D D D (0xffff_d052) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 31 30 29 28 27 26 25 24 (imr83) bit sy mbol D D D D D (0xffff_d053) read/write r r/w r r/w reset vaue 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. tmp19a71 tmp19a71 7-49 interrupt mode control registers 7 6 5 4 3 2 1 0 imr84 bit sy mbol D eim84 dm84 D il84 (0xffff_d054) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 84 as dmac trigger when dm84 = 0 interrupt numb er 84 (inttbcap00) priority level 000: interrupt disabled 001-111: 1-7 when dm84 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr85) bit sy mbol D eim85 dm85 D il85 (0xffff_d055) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 85 as dmac trigger when dm85 = 0 interrupt numb er 85 (inttbcap01) priority level 000: interrupt disabled 001-111: 1-7 when dm85 = 1 dmac channel select 000-111: 0-7 23 22 21 20 19 18 17 16 (imr86) bit sy mbol D eim86 dm86 D il86 (0xffff_d056) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 86 as dmac trigger when dm86 = 0 interrupt number 86 ( inttbcap10) priority level 000: interrupt disabled 001-111: 1-7 when dm86 = 1 dmac channel select 000-111: 0-7 31 30 29 28 27 26 25 24 (imr87) bit sy mbol D eim87 dm87 D il87 (0xffff_d057) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 87 as dmac trigger when dm87 = 0 interrupt number 87 ( inttbcap11) priority level 000: interrupt disabled 001-111: 1-7 when dm87 = 1 dmac channel select 000-111: 0-7 tmp19a71 tmp19a71 7-50 interrupt mode control registers 7 6 5 4 3 2 1 0 imr88 bit symbol D eim88 dm88 D il88 (0xffff_d058) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 88 as dmac trigger when dm88 = 0 interrupt number 88 ( inttbcap20) priority level 000: interrupt disabled 001-111: 1-7 when dm88 = 1 dmac channel select 000-111: 0-7 15 14 13 12 11 10 9 8 (imr89) bit sy mbol D eim89 dm89 D il89 (0xffff_d059) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 89 as dmac trigger when dm89 = 0 interrupt number 89 ( inttbcap21) priority level 000: interrupt disabled 001-111: 1-7 when dm89 = 1 dmac channel select 000-111: 0-7 23 22 21 20 19 18 17 16 (imr90) bit sy mbol D eim90 dm90 D il90 (0xffff_d05a) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 90 as dmac trigger when dm90 = 0 interrupt number 90 ( inttbcap30) priority level 000: interrupt disabled 001-111: 1-7 when dm90 = 1 dmac channel select 000-111: 0-7 31 30 29 28 27 26 25 24 (imr91) bit sy mbol D eim91 dm91 D il91 (0xffff_d05b) read/write r r/w r r/w reset value 0 00 0 0 000 function set sensitivity of interrupt r equest. 10 must be set to it. dmac trigger 0: disable 1: enable interrupt number 91 as dmac trigger when dm91 = 0 interrupt number 91 ( inttbcap31) priority level 000: interrupt disabled 001-111: 1-7 when dm91 = 1 dmac channel select 000-111: 0-7 tmp19a71 tmp19a71 7-51 interrupt mode control registers 7 6 5 4 3 2 1 0 imr92 bit sy mbol D D D D D (0xffff_d05c) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 15 14 13 12 11 10 9 8 (imr93) bit sy mbol D D D D D (0xffff_d05d) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 23 22 21 20 19 18 17 16 (imr94) bit sy mbol D D D D D (0xffff_d05e) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. 31 30 29 28 27 26 25 24 (imr95) bit sy mbol D D D D D (0xffff_d05f) read/write r r/w r r/w reset value 0 00 0 0 000 function must be set as 00. must be set as 0. must be set as 000. tmp19a71 tmp19a71 7-52 7.8.10.5 interrupt request clear register (iclr) by setting ivr[8:0] of interrupt source whose re q uest is desired to clear to iclr, an interrupt request suspended can be cleared. as an interrupt request is cleared, ivr va lues also are cleared, thus no determination of interrupt sources can be made. interrupt requests must never be cleared before reading ivr values. interrupt request clear register 7 6 5 4 3 2 1 0 iclr bit sy mbol iv (0xffff_d084) read/write w reset value D D D D D D D D function set the values in ivr[8:0] of sources to the interrup ts whose request is desired to clear. 15 14 13 12 11 10 9 8 bit sy mbol D D D D D D D iv read/write r w reset value 0 0 0 0 0 0 0 D function note 1: this register must be accessed in 16 bits. note 2: regardless of sensitivity setting of imrxx tmp19a71 tmp19a71 7-53 7.8.10.6 mode control register modecr bus error exceptions are not generated by store instructions or write accesses by the dmac. by s etting a 0 in the berctl bit of the mode cr, a nmi can be generated when the bus error area is accessed by a store instruction or a write access by the dmac. mode control register 7 6 5 4 3 2 1 0 modecr bit symbol (0xffff_d400) read/write r reset value 0 0 0 0 0 0 0 0 function 15 14 13 12 11 10 9 8 bit sy mbol read/write r reset value 0 0 0 0 0 0 0 0 function 23 22 21 20 19 18 17 16 bit sy mbol berctl read/write r r/w reset value 0 0 0 0 0 1 1 1 function must be set as 1. must be set as 1. bus error b y store access 0: nmi generated 1: nmi not generated 31 30 29 28 27 26 25 24 bit symbol read/write r reset value 0 0 0 0 0 0 0 0 function note: this register must be accessed as a 32-bit quantity. tmp19a71 tmp19a71 7-54 7.9 usage note of interrupt cautions and warnings upon using interrupts are described here. a user program must be programmed, meeting the requirements below. 7.9.1 tx19a processor core ? since tmp19a71 has no external bus interface, no interrupt can be used by setting 0 to status tmp19a71 tmp19a71 7-55 7.9.2 intc ? when there are two or more interrupt requests of the same level, the acceptance is made on a priority basis from the sour ces of the smallest interrupt number. ? interru pt sources of leve l 0 is not suspended. ? t o disable an interrupt source (interrupt level 0) individually, disable it in interrupt disabled state. ? init ial values of imrxx tmp19a71 tmp19a71 8-1 8. i/o ports 8.1 port 0 (p00 to p07) port 0 pins can be individually programmed to function as disc rete general-purpose i/o pins. internal data bus p0cr p0d p0ier selector p0dssr reset high/ low p0pucr s a b p00 to p07 p0d read vcc3 note: the selectors in the figure output input a when s=1 and input b when s=0. figure 8.1.1 port 0 (p00 to p07) tmp19a71 tmp19a71 8-2 port 0 register 7 6 5 4 3 2 1 0 p0d bit symbol p0d7 p0d6 p0d5 p0d4 p0d3 p0d2 p0d1 p0d0 (0xffff_c000) read/write r/w reset value 0 0 0 0 0 0 0 0 function port 0 output data (output latch) note: when p0ier=0, the port state can be read from this register. port 0 control register 7 6 5 4 3 2 1 0 p0cr bit symbol p0cr7 p0cr6 p0cr5 p0cr4 p0cr3 p0cr2 p0cr1 p0cr0 (0xffff_c004) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: output disabled 1: output enabled port 0 input enable register 7 6 5 4 3 2 1 0 p0ier bit symbol p0ier7 p0ier6 p0ier5 p0ier4 p0ier3 p0ier2 p0ier1 p0ier0 (0xffff_c008) read/write r/w reset value 1 1 1 1 1 1 1 1 function 0: input enabled 1: input disabled port 0 drive strength register 7 6 5 4 3 2 1 0 p0dssr bit symbol p0dssr7 p0dssr6 p0d ssr5 p0dssr4 p0dssr3 p0dssr2 p0dssr1 p0dssr0 (0xffff_c00c) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: low drive capability 1: high drive capability note: the current flowing through ports should not exceed the maximum rating. port 0 pull-up control register 7 6 5 4 3 2 1 0 p0pucr bit symbol p0pucr7 p0pucr6 p0pucr5 p0pucr4 p0pucr3 p0pucr2 p0pucr1 p0pucr0 (0xffff_c014) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: pull-up disabled 1: pull-up enabled tmp19a71 tmp19a71 8-3 8.2 port 1 (p10 to p17) eight port 1 pins can be individually programme d to function as discre te general-purpose i/o pins. internal data bus p1cr p1d p1ier selector p1dssr reset low/ high p1pucr s a b p10 to p17 p1d read vcc3 note: the selectors in the figure output input a when s=1 and input b when s=0. figure 8.2.1 port 1 (p10 to p17) tmp19a71 tmp19a71 8-4 port 1 register 7 6 5 4 3 2 1 0 p1d bit symbol p1d7 p1d6 p1d5 p1d4 p1d3 p1d2 p1d1 p1d0 (0xffff_c040) read/write r/w reset value 0 0 0 0 0 0 0 0 function port 1 output data (output latch) note: when p1ier=0, the port state can be read from this register. port 1 control register 7 6 5 4 3 2 1 0 p1cr bit symbol p1cr7 p1cr6 p1cr5 p1cr4 p1cr3 p1cr2 p1cr1 p1cr0 (0xffff_c044) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: output disabled 1: output enabled port 1 input enable register 7 6 5 4 3 2 1 0 p1ier bit symbol p1ier7 p1ier6 p1ier5 p1ier4 p1ier3 p1ier2 p1ier1 p1ier0 (0xffff_c048) read/write r/w reset value 1 1 1 1 1 1 1 1 function 0: input enabled 1: input disabled port 1 drive strength register 7 6 5 4 3 2 1 0 p1dssr bit symbol p1dssr7 p1dssr6 p1d ssr5 p1dssr4 p1dssr3 p1dssr2 p1dssr1 p1dssr0 (0xffff_c04c) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: low drive capability 1: high drive capability note: the current flowing through ports should not exceed the maximum ratings for each port pin and for all the port pins. port 1 pull-up control register 7 6 5 4 3 2 1 0 p1pucr bit symbol p1pucr7 p1pucr6 p1pucr5 p1pucr4 p1pucr3 p1pucr2 p1pucr1 p1pucr0 (0xffff_c054) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: pull-up disabled 1: pull-up enabled tmp19a71 tmp19a71 8-5 8.3 port 2 (p20 to p24) five port 2 pins can be indi vidually programmed to function as discrete general-purpose i/o pins. internal data bus p2cr p2d p2ier selector p2dssr reset low/ high p2pucr s a b p20 p24 p2d read vcc3 note: the selectors in the figure output input a when s=1 and input b when s=0. figure 8.3.1 port 2 (p20 to p24 tmp19a71 tmp19a71 8-6 port 2 register 7 6 5 4 3 2 1 0 p2d bit symbol D D D p2d4 p2d3 p2d2 p2d1 p2d0 (0xffff_c080) read/write r/w reset value 0 0 0 0 0 0 0 0 function port 2 output data (output latch) note: when p2ier=0, the port state can be read from this register. port 2 control register 7 6 5 4 3 2 1 0 p2cr bit symbol D D D p2cr4 p2cr3 p2cr2 p2cr1 p2cr0 (0xffff_c084) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: output disabled 1: output enabled port 2 input enable register 7 6 5 4 3 2 1 0 p2ier bit symbol D D D p2ier4 p2ier3 p2ier2 p2ier1 p2ier0 (0xffff_c088) read/write r/w reset value 0 0 0 1 1 1 1 1 function 0: input enabled 1: input disabled port 2 drive strength register 7 6 5 4 3 2 1 0 p2dssr bit symbol D D D p2dssr4 p2dssr3 p2dssr2 p2dssr1 p2dssr0 (0xffff_c08c) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: low drive capability 1: high drive capability note: the current flowing through ports should not exceed the maximum ratings for each port pin and for all the port pins. port 2 pull-up control register 7 6 5 4 3 2 1 0 p2pucr bit symbol D D D p2pucr4 p2pucr3 p2pucr2 p2pucr1 p2pucr0 (0xffff_c094) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: pull-up disabled 1: pull-up enabled note: in dsu (ejtag) mode, port 2 pins function as dsu control pins and the p2d, p2cr, p2ier, p2ddsr and p2pucr are invalid. tmp19a71 tmp19a71 8-7 8.4 port 3 (p30 to p34) five port 3 pins can be individually programme d to function as discrete general-purpose i/o pins. figure 8.4.1 shows the configuration of port 3 when not used in dsu (ejtag) mode. internal data bus p3cr p3d p3ier selector p3dssr reset low/ high p3pucr s a b p30 p34 p3d read vcc3 note: the selectors in the figure output input a when s=1 and input b when s=0. figure 8.4.1 port 3 (p30 to p34 tmp19a71 tmp19a71 8-8 port 3 register 7 6 5 4 3 2 1 0 p3d bit symbol D D D p3d4 p3d3 p3d2 p3d1 p3d0 (0xffff_c0c0) read/write r/w reset value 0 0 0 0 0 0 0 0 function port 3 output data (output latch) note: when p3ier=0, the port state can be read from this register. port 3 control register 7 6 5 4 3 2 1 0 p3cr bit symbol D D D p3cr4 p3cr3 p3cr2 p3cr1 p3cr0 (0xffff_c0c4) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: output disabled 1: output enabled port 3 input enable register 7 6 5 4 3 2 1 0 p3ier bit symbol D D D p3ier4 p3ier3 p3ier2 p3ier1 p3ier0 (0xffff_c0c8) read/write r/w reset value 0 0 0 1 1 1 1 1 function 0: input enabled 1: input disabled port 3 drive strength register 7 6 5 4 3 2 1 0 p3dssr bit symbol D D D p3dssr4 p3dssr3 p3dssr2 p3dssr1 p3dssr0 (0xffff_c0cc) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: low drive capability 1: high drive capability note: the current flowing through ports should not exceed the maximum ratings for each port pin and for all the port pins. port 3 pull-up control register 7 6 5 4 3 2 1 0 p3pucr bit symbol D D D p3pucr4 p3pucr3 p3pucr2 p3pucr1 p3pucr0 (0xffff_c0d4) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: pull-up disabled 1: pull-up enabled note: in level-1 dsu (ejtag) mode, port 3 pins function as dsu control pins and the p3d, p3cr, p3ier, p3dssr and p3pucr are invalid. tmp19a71 tmp19a71 8-9 8.5 port 5 (p50 to p57) eight port 5 pins are input-only pins that can al so function as the analog input pins of the ad converter (adc). note 1: as port 5 uses avcc0 as its i/o power source, it must be connected with the 3.3 v source even if adc0 is not used. note 2: when port 5 is not used as analog input pins, the ad conversion accuracy of adc0 may deteriorate by a few lsbs. be sure to check that this poses no problem on your system. p5d read internal data bus p5ier reset p5pucr p50 p56 channel selector conversion result resister ad converter vcc3 figure 8.5.1 port 5 (p50 to p56 tmp19a71 tmp19a71 8-10 p5d read internal data bus p5ier reset p5pucr p57 channel selector conversion result resister ad converter p5fr func. in vcc3 figure 8.5.2 port 5 (p57) tmp19a71 tmp19a71 8-11 port 5 register 7 6 5 4 3 2 1 0 p5d bit symbol p5d7 p5d6 p5d5 p5d4 p5d3 p5d2 p5d1 p5d0 (0xffff_c140) read/write r reset value 0 0 0 0 0 0 0 0 function port 5 input data note: when p5ier=0, the port state can be read from this register. port 5 input enable register 7 6 5 4 3 2 1 0 p5ier bit symbol p5ier7 p5ier6 p5ier5 p5ier4 p5ier3 p5ier2 p5ier1 p5ier0 (0xffff_c148) read/write r/w reset value 1 1 1 1 1 1 1 1 function 0: input enabled 1: input disabled port 5 pull-up control register 7 6 5 4 3 2 1 0 p5pucr bit symbol p5pucr7 p5pucr6 p5pucr5 p5pucr4 p5pucr3 p5pucr2 p5pucr1 p5pucr0 (0xffff_c154) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: pull-up disabled 1: pull-up enabled port 5 function register 7 6 5 4 3 2 1 0 p5fr bit symbol p5fr7 D D D D D D D (0xffff_c158) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: port/ad input 1:adtrg0 tmp19a71 tmp19a71 8-12 8.6 port 6 (p60 to p67) the lower 4 bits are input-only pins, and the up per 4 bits can be individually programmed to function as discrete general-purpose i/o pins shared with the analog input pins of the ad converter (adc). note 1: as port 6 uses avcc1 as its i/o power source, it must be connected to the 3.3 v source even if adc1 is not used. note 2: when port 6 is not used as analog input pins, the ad conversion accuracy of adc1 may deteriorate by a few lsbs. when port 6 is used as an output port, this may result in a noticeable deterioration in ad conversion accuracy which may exceed the worst conditions presented in the ad conversion characteristics later in this manual. be sure to check that this poses no problem on your system. p6d read internal data bus p6ier reset p6pucr p60 p63 channel selector conversion result resister ad converter vcc3 figure 8.6.1 port 6 (p60 to p63) tmp19a71 tmp19a71 8-13 note: the selectors in the figure output input a when s=1 and input b when s=0. figure 8.6.2 port 6 (p64 to p67) tmp19a71 tmp19a71 8-14 port 6 register 7 6 5 4 3 2 1 0 p6d bit symbol p6d7 p6d6 p6d5 p6d4 p6d3 p6d2 p6d1 p6d0 (0xffff_c180) read/write r/w r reset value 0 0 0 0 0 0 0 0 function port 6 output data (output latch) port 6 input data note: when p6ier=0, the port state can be read from this register. port 6 control register 7 6 5 4 3 2 1 0 p6cr bit symbol p6cr7 p6cr6 p6cr5 p6cr4 D D D D (0xffff_c184) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: output disabled 1: output enabled port 6 input enable register 7 6 5 4 3 2 1 0 p6ier bit symbol p6ier7 p6ier6 p6ier5 p6ier4 p6ier3 p6ier2 p6ier1 p6ier0 (0xffff_c188) read/write r/w reset value 1 1 1 1 1 1 1 1 function 0: input enabled 1: input disabled port 6 drive strength register 7 6 5 4 3 2 1 0 p6dssr bit symbol p6dssr7 p6dssr6 p6dssr5 p6dssr4 D D D D (0xffff_c18c) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: low drive capability 1: high drive capability note: the current flowing through ports should not exceed the maximum ratings for each port pin and for all the port pins. port 6 pull-up control register 7 6 5 4 3 2 1 0 p6pucr bit symbol p6pucr7 p6pucr6 p6pucr5 p6pucr4 p6pucr3 p6pucr2 p6pucr1 p6pucr0 (0xffff_c194) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: pull-up disabled 1: pull-up enabled tmp19a71 tmp19a71 8-15 port 6 function register 7 6 5 4 3 2 1 0 p6fr bit symbol p6fr7 p6fr6 p6fr5 p6fr4 D D D D (0xffff_c198) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0:port/ad input 1:adtrg1 /int6 0:port/ad input 1:int5 0:port/ad input 1:int4 0:port/ad input 1:int3 note: when the p6fr is set to 1 (port or ad input) with p6cr=1 (output enabled), the output values of this register become undefined. tmp19a71 tmp19a71 8-16 8.7 port 7 (p70 to p72) three port 7 pins can be individually programmed to function as discrete general-purpose i/o pins shared with the analog input pins of the ad converter (adc). note 1: as port 7 uses avcc1 as its i/o power source, it must be connected to the 3.3 v source even if adc1 is not used. note 2: when port 7 is not used as analog input pins, the ad conversion accuracy of adc1 may deteriorate by a few lsbs. when port 7 is used as an output port, this may result in a noticeable deterioration in ad conversion accuracy which may exceed the worst conditions presented in the ad conversion characteristics later in this manual. be sure to check that this poses no problem on your system. note: the selectors in the figure output input a when s=1 and input b when s=0. figure 8.7.1 port 7 (p70 to p72) tmp19a71 tmp19a71 8-17 port 7 register 7 6 5 4 3 2 1 0 p7d bit symbol D D D D D p7d2 p7d1 p7d0 (0xffff_c1c0) read/write r/w reset value 0 0 0 0 0 0 0 0 function port 7 output data (output latch) note: when p7ier=0, the port state can be read from this register. port 7 control register 7 6 5 4 3 2 1 0 p7cr bit symbol D D D D D p7cr2 p7cr1 p7cr0 (0xffff_c1c4) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: output disabled 1: output enabled port 7 input enable register 7 6 5 4 3 2 1 0 p7ier bit symbol D D D D D p7ier2 p7ier1 p7ier0 (0xffff_c1c8) read/write r/w reset value 0 0 0 0 0 1 1 1 function 0: input enabled 1: input disabled port 7 drive strength register 7 6 5 4 3 2 1 0 p7dssr bit symbol D D D D D p7dssr2 p7dssr1 p7dssr0 (0xffff_c1cc) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: low drive capability 1: high drive capability note: the current flowing through ports should not exceed the maximum ratings for each port pin and for all the port pins. port 7 pull-up control register 7 6 5 4 3 2 1 0 p7pucr bit symbol D D D D D p7pucr2 p7pucr1 p7pucr0 (0xffff_c1d4) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: pull-up disabled 1: pull-up enabled tmp19a71 tmp19a71 8-18 port 7 function register 7 6 5 4 3 2 1 0 p7fr1 bit symbol D D D D D p7fr12 p7fr11 p7fr10 (0xffff_c1d8) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0:port/ad input 1:int9 0:port/ad input 1:int8 0:port/ad input 1:int7 note: when the p7fr is set to 1 (port or ad input) with p7cr=1 (output enabled), the output values of this register become undefined. port 7 function register 7 6 5 4 3 2 1 0 p7fr2 bit symbol D D D D D p7fr22 p7fr21 p7fr20 (0xffff_c1dc) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0:port/ad input 1:tb3in 0:port/ad input 1:tb2in 0:port/ad input 1:tb1in tmp19a71 tmp19a71 8-19 8.8 port 8 (p80 to p87) eight port 8 pins can be individually programme d to function as discre te general-purpose i/o pins. note: the selectors in the figure output input a when s=1 and input b when s=0. figure 8.8.1 port 8 (p80 to p87) p8d read internal data bus p8cr p8d p8fr p8ier func. out selector selector p8dssr func. in reset low/ high p8pucr a b s s a b p80 p87 configurable as an open-drain output (bit0,2,6,7) vcc3 tmp19a71 tmp19a71 8-20 port 8 register 7 6 5 4 3 2 1 0 p8d bit symbol p8d7 p8d6 p8d5 p8d4 p8d3 p8d2 p8d1 p8d0 (0xffff_c200) read/write r/w reset value 0 0 0 0 0 0 0 0 function port 8 output data (output latch) note: when p8ier=0, the port state can be read from this register. port 8 control register 7 6 5 4 3 2 1 0 p8cr bit symbol p8cr7 p8cr6 p8cr5 p8cr4 p8cr3 p8cr2 p8cr1 p8cr0 (0xffff_c204) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: output disabled 1: output enabled port 8 input enable register 7 6 5 4 3 2 1 0 p8ier bit symbol p8ier7 p8ier6 p8ier5 p8ier4 p8ier3 p8ier2 p8ier1 p8ier0 (0xffff_c208) read/write r/w reset value 1 1 1 1 1 1 1 1 function 0: input enabled 1: input disabled port 8 drive strength register 7 6 5 4 3 2 1 0 p8dssr bit symbol p8dssr7 p8dssr6 p8d ssr5 p8dssr4 p8dssr3 p8dssr2 p8dssr1 p8dssr0 (0xffff_c20c) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: low drive capability 1: high drive capability note: the current flowing through ports should not exceed the maximum ratings for each port pin and for all the port pins. port 8 open-drain control register 7 6 5 4 3 2 1 0 p8odcr bit symbol p8odcr7 p8odcr6 D D D p8odcr2 D p8odcr0 (0xffff_c210) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: open-drain disabled 1: open-drain enabled port 8 pull-up control register 7 6 5 4 3 2 1 0 p8pucr bit symbol p8pucr7 p8pucr6 p8pucr5 p8pucr4 p8pucr3 p8pucr2 p8pucr1 p8pucr0 (0xffff_c214) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: pull-up disabled 1: pull-up enabled note: in level-1 dsu (ejtag) mode, p86 and p87 function as dsu control pins and the p8d, p8cr, p8ier, p8dssr, p8odcr and p8pucr are invalid. tmp19a71 tmp19a71 8-21 port 8 function register 1 7 6 5 4 3 2 1 0 p8fr bit symbol p8fr17 p8fr16 p8fr15 p8fr14 p8fr13 p8fr12 p8fr11 p8fr10 (0xffff_c218) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0:port 1:sclk2 /cts2 0:port 1:tx2 0:port 1:rx2 0:port 1:tb1out /int0 0:port 1:rx1 0:port 1:tx1 0:port 1:rx0 0:port 1:tx0 note: when the p8fr is set to 1 (port input) with p8cr=1 (output enabled), the output values of p81, p83, p84, p85 and p87 become undefined. tmp19a71 tmp19a71 8-22 8.9 port 9 (p90 to p95) six port 9 pins can be individually programmed to function as discre te general-purpose i/o pins. p93 is shared with the emergency stop sign al input pin (emg pin) of tmrb0, and set as a general-purpose port after reset. p93 can be used as the emg pin by setting the p9fr2.p9fr23 bit which is protected with the lock function. likewise, p95 is shared with the nmi pin, and set as a general-purpose port afte r reset. p95 can be used as the nmi pin by setting the p9fr1.p9fr15 bit which is protected with the lock function. p9d read internal data bus p9cr p9d p9fr p9ier func. out selector p9dssr func. in reset low/ high p9pucr a b s p90p92, p94,p95 vcc3 selector s b a note: the selectors in the figure output input a when s=1 and input b when s=0. figure 8.9.1 port 9 (p90 to p92, p94, p95) tmp19a71 tmp19a71 8-23 p9d read internal data bus pacr p9d p9fr (with lock function) p9ier selector p9dssr func. in reset low/ high p9pucr s a b p93 emg in emg detecton circuit vcc3 note: the selectors in the figure output input a when s=1 and input b when s=0. figure 8.9.2 port 9 (p93) tmp19a71 tmp19a71 8-24 port 9 register 7 6 5 4 3 2 1 0 p9d bit symbol D D p9d5 p9d4 p9d3 p9d2 p9d1 p9d0 (0xffff_c240) read/write r/w reset value 0 0 0 0 0 0 0 0 function port 9 output data (output latch) note: when p9ier=0, the port state can be read from this register. port 9 control register 7 6 5 4 3 2 1 0 p9cr bit symbol D D p9cr5 p9cr4 p9cr3 p9cr2 p9cr1 p9cr0 (0xffff_c244) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: output disabled 1: output enabled port 9 input enable register 7 6 5 4 3 2 1 0 p9ier bit symbol D D p9ier5 p9ier4 p9ier3 p9ier2 p9ier1 p9ier0 (0xffff_c248) read/write r/w reset value 0 0 1 1 1 1 1 1 function 0: input enabled 1: input disabled port 9 drive strength register 7 6 5 4 3 2 1 0 p9dssr bit symbol D D p9dssr5 p9dssr4 p9dssr3 p9dssr2 p9dssr1 p9dssr0 (0xffff_c24c) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0:low drive capability 1: high drive capability note: the current flowing through ports should not exceed the maximum ratings for each port pin and for all the port pins. port 9 pull-up control register 7 6 5 4 3 2 1 0 p9pucr bit symbol D D p9pucr5 p9pucr4 p9pucr3 p9pucr2 p9pucr1 p9pucr0 (0xffff_c254) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: pull-up disabled 1: pull-up enabled note: p94 is designated as the boot pin. to start up the device in boot mode (see the chapter on flash memory), p94 should be set to 0 during a reset sequence. to start up the device in normal mode, p94 should be set to 1 during a reset sequence. tmp19a71 tmp19a71 8-25 port 9 function register 1 7 6 5 4 3 2 1 0 p9fr1 bit symbol D D p9fr15 p9fr14 p9fr13 p9fr12 p9fr11 p9fr10 (0xffff_c258) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0:port 1:nmi (with lock function) 0:port 1:tb0out 0:port 1:tb0in 0:port 1:encz 0:pprt 1:encb 0:port 1:enca port 9 function register 2 7 6 5 4 3 2 1 0 p9fr2 bit symbol D D D D p9fr23 p9fr22 p9fr21 p9fr20 (0xffff_c25c) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0:port 1:emg input (with lock function) 0:port 1:sclk3 /cts3 0:port 1:tx3 0:port 1:rx3 port 9 emg control register 7 6 5 4 3 2 1 0 p9ecr bit symbol D D erm emgf emge D D (0xffff_c260) read/write r/w r r/w reset value 0 0 0 0 0 0 0 0 function emg sensitivity 00: low level 01: high level 10: falling edge 11: rising edge (with lock function) emg condition flag 0: normal condition 1: emg condition emg condition clear 1: clear emg condition t his bit is read as 0. (with lock function) p9fr23 is a register bit with the lock function. writing a value to this register requires writing 0x55 and then 0xaa to the p9eclr register. once these values are written, the p9eclr remains in effect until a write to a port 9 register with the lock function is completed. setting the p9fr23 bit to 1 prohibits writes to other registers related to p93. p9fr15 is a register bit with the lock function. writing a value to this bit requires writing 0x55 and then 0xaa to the p9eclr register. once these values are written, the p9eclr remains in effect until a write to a port 9 register with the lock function is completed. tmp19a71 tmp19a71 8-26 port 9 emg clear register 7 6 5 4 3 2 1 0 p9eclr bit symbol D (0xffff_c264) read/write w reset value D function writing 0x55 and then 0xaa to th is register allows a single write to a register with the lock function. note 1: setting both p9fr13 and p9fr23 to 1 results in undefined behavior. note 2: when the p9fr is set to 1 (port input) with p9cr=1 (output enabled), the output values of p90, p91, p92, p93 and p95 become undefined. 8.9.1 notes on using the emergency stop signal input pin (p93) 8.9.1.1 port operation in the emg condition when p93 set as the emg pin is asserted, output is disabled on p94 and an inttbe0 interrupt is generated in port 9, as shown in table 8.9.1. as the emg detection circuit operates ind ependently of the 16-bit timer, the 16-bit timer continues to operate normally even in case of emergency. table 8.9.1 port operation in the emg condition p93 p94 inttbe0 normal pwm/port output not generated emg hi-z generated tmp19a71 tmp19a71 8-27 8.9.1.2 register settings for p93 when p93 is set as the emg pin (p9fr2.p9fr2 3=1), other registers related to p93 (i.e., p9cr3, p9ier3, p9dssr3, p9pucr 3, p9fr13) cannot be changed. clearing the p9fr23 bit to 0 enables writes to these registers again. table 8.9.2 shows the register settings for p93 acc ording to the selected function. table 8.9.2 register settings for p93 general-purpose i/o port tb0in emg pin p9cr.p9cr3 x 0 0 (note) p9ier.p9ier3 x 0 0 (note) p9dssr.p9dssr3 x x x (note) p9pucr.p9pucr3 x x 0 (note) p9fr1.p9fr13 0 1 0 p9fr2.p9fr23 0 0 1 note: must be set before the p9fr2.p9fr23 bit is set. general procedure for setting p93 as the emg pin (falling edge sensitive) p9eclr=0x55 0xaa ; release lock p9ecr tmp19a71 tmp19a71 8-28 8.10 port a (pa0 to pa7) eight port a pins can be individually programme d to function as discre te general-purpose i/o pins. pa6 is shared with the emergency stop sign al input pin (emg0 pin) of pmd0, and set as a general-purpose port after reset. pa6 can be used as the emg0 pin by setting the pafr.pafr6 bit which is protected with the lock function. note: the selectors in the figure output input a when s=1 and input b when s=0. figure 8.10.1 port a (pa0 to pa5, pa7) pad read internal data bus pacr pad pafr paier func. out selector padssr func. in reset low/ high papucr a b s pa0 to pa5, pa7 vcc3 selector s b a tmp19a71 tmp19a71 8-29 pad read internal data bus pacr pad pafr (with lock function) paier selector padssr emg in reset low/ high papucr s a b pa6 emg detection circuit vcc3 note: the selectors in the figure output input a when s=1 and input b when s=0. figure 8.10.2 port a (pa6) tmp19a71 tmp19a71 8-30 port a register 7 6 5 4 3 2 1 0 pad bit symbol pad7 pad6 pad5 pad4 pad3 pad2 pad1 pad0 (0xffff_c280) read/write r/w reset value 0 0 0 0 0 0 0 0 function port a output data (output latch) note: when paier=0, the port state can be read from this register. port a control register 7 6 5 4 3 2 1 0 pacr bit symbol pacr7 pacr6 pacr5 pacr4 pacr3 pacr2 pacr1 pacr0 (0xffff_c284) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: output disabled 1: output enabled port a input enable register 7 6 5 4 3 2 1 0 paier bit symbol paier7 paier6 paier 5 paier4 paier3 paier2 paier1 paier0 (0xffff_c288) read/write r/w reset value 1 1 1 1 1 1 1 1 function 0: input enabled 1: input disabled port a drive strength register 7 6 5 4 3 2 1 0 padssr bit symbol padssr7 padssr6 padssr 5 padssr4 padssr3 padssr2 padssr1 padssr0 (0xffff_c28c) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: low drive capability 1: high drive capability note: the current flowing through ports should not exceed the maximum ratings for each port pin and for all the port pins. port a pull-up control register 7 6 5 4 3 2 1 0 papucr bit symbol papucr7 papucr6 papucr5 papucr4 papucr3 papucr2 papucr1 papucr0 (0xffff_c294) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: pull-up disabled 1: pull-up enabled tmp19a71 tmp19a71 8-31 port a function register 7 6 5 4 3 2 1 0 pafr bit symbol pafr7 pafr6 pafr5 pafr4 pafr3 pafr2 pafr1 pafr0 (0xffff_c298) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0:port 1:tb2out/ int1 0:port 1:emg0 (with lock function) 0:port 1:z0 0:port 1:w0 0:port 1:y0 0:port 1:v0 0:port 1:x0 0:port 1:u0 port a emg control register 7 6 5 4 3 2 1 0 paecr bit symbol D D erma emgfa emgea D D (0xffff_c29c) read/write r/w r r/w reset value 0 0 0 0 0 0 0 0 function emg sensitivity 00: low level 01: high level 10: falling edge 11: rising edge (with lock function) emg condition flag 0: normal condition 1: emg condition emg condition clear 1: clear emg condition this bit is read as 0. (with lock function) port a emg clear register 7 6 5 4 3 2 1 0 paeclr bit symbol D (0xffff_c2a0) read/write w reset value D function writing 0x55 and then 0xaa to this register allows a single write to a port a register with the lock function. note: when the pafr is set to 1 (port input) with pacr=1 (output enabled), the output values of pa6 and pa7 become undefined. for details, see 8.12 notes on using the emergency stop signal input pins (pa6, pb6). when the pafr6 bit is set to 1, pa6 is used as the emg0 pin. the pafr6 bit has the lock function, and writing a value to this bit requires writing 0x55 and then 0xaa to the paeclr register. once these values are written, the paeclr register remains in effect until a write to a port a register with the lock function is completed. setting the pafr6 bit to 1 prohibits writes to other registers related to pa6. tmp19a71 tmp19a71 8-32 8.11 port b (pb0 to pb7) eight port b pins can be individually programme d to function as discre te general-purpose i/o pins. pb6 is shared with the emergency stop sign al input pin (emg1 pin) of pmd1, and set as a general-purpose port after reset. pb6 can be used as the emg1 pin by setting the pbfr.pbfr6 bit which is protected with the lock function. note: the selectors in the figure output input a when s=1 and input b when s=0. figure 8.11.1 port b (pb0 to pb5, pb7) pbd read internal data bus pbcr pbd pbfr pbier func. out selector pbdssr func. in reset low/ high pbpucr a b s pb0 to pb5, pb7 vcc3 selector s b a tmp19a71 tmp19a71 8-33 pbd read internal data bus pbcr pbd pbfr (with lock function) pbier selector pbdssr emg in reset low/ high pbpucr s a b pb6 emg detection circuit vcc3 note: the selectors in the figure output input a when s=1 and input b when s=0. figure 8.11.2 port b (p86) tmp19a71 tmp19a71 8-34 port b register 7 6 5 4 3 2 1 0 pbd bit symbol pbd7 pbd6 pbd5 pbd4 pbd3 pbd2 pbd1 pbd0 (0xffff_c2c0) read/write r/w reset value 0 0 0 0 0 0 0 0 function port b output data (output latch) note: when pbier=0, the port state can be read from this register. port b control register 7 6 5 4 3 2 1 0 pbcr bit symbol pbcr7 pbcr6 pbcr5 pbcr4 pbcr3 pbcr2 pbcr1 pbcr0 (0xffff_c2c4) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: output disabled 1: output enabled port b input enable register 7 6 5 4 3 2 1 0 pbier bit symbol pbier7 pbier6 pbier 5 pbier4 pbier3 pbier2 pbier1 pbier0 (0xffff_c2c8) read/write r/w reset value 1 1 1 1 1 1 1 1 function 0: input enabled 1: input disabled port b drive strength register 7 6 5 4 3 2 1 0 pbdssr bit symbol pbdssr7 pbdssr6 pbdssr 5 pbdssr4 pbdssr3 pbdssr2 pbdssr1 pbdssr0 (0xffff_c2cc) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: low drive capability 1: high drive capability note: the current flowing through ports should not exceed the maximum ratings for each port pin and for all the port pins. port b pull-up control register 7 6 5 4 3 2 1 0 pbpucr bit symbol pbpucr7 pbpucr6 pbpucr5 pbpucr4 pbpucr3 pbpucr2 pbpucr1 pbpucr0 (0xffff_c2d4) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0: pull-up disabled 1: pull-up enabled tmp19a71 tmp19a71 8-35 port b function register 7 6 5 4 3 2 1 0 pbfr bit symbol pbfr7 pbfr6 pbfr5 pbfr4 pbfr3 pbfr2 pbfr1 pbfr0 (0xffff_c2d8) read/write r/w reset value 0 0 0 0 0 0 0 0 function 0:port 1:tb3out/ int2 0:port 1:emg1 (with lock function) 0:port 1:z1 0:port 1:w1 0:port 1:y1 0:port 1:v1 0:port 1:x1 0:port 1:u1 port b emg control register 7 6 5 4 3 2 1 0 pbecr bit symbol D D ermb emgfb emgeb D D (0xffff_c2dc) read/write r/w r r/w reset value 0 0 0 0 0 0 0 0 function emg sensitivity 00: low level 01: high level 10: falling edge 11: rising edge (with lock function) emg condition flag 0: normal condition 1: emg condition emg condition clear 1: clear emg condition this bit is read as 0. (with lock function) port b emg clear register 7 6 5 4 3 2 1 0 pbeclr bit symbol D (0xffff_c2e0) read/write w reset value D function writing 0x55 and then 0xaa to this register allows a single write to a port b register with the lock function. note: when the pbfr is set to 1 (port input) with pbcr=1 (output enabled), the output values of pb6 and pb7 become undefined. for details, see 8.12 notes on using the emergency stop signal input pins (pa6, pb6). when the pbfr6 bit is set to 1, pb6 is used as the emg1 pin. the pbfr6 bit has the lock function, and writing to this bit requires writing 0x55 and then 0xaa to the pbeclr register. once these values are written, the pbeclr register remains in effect until a write to a port b register with the lock function is completed. setting the pbfr6 bit to 1 prohibits writes to other registers related to pb6. tmp19a71 tmp19a71 8-36 8.12 notes on using the emergency st op signal input pins (pa6, pb6) 8.12.1 block diagram of the emg detection circuit note: the following descriptions for pa[6:0] (pmd0) also apply to pb[6:0] (pmd1), unless otherwise noted. when pa6 is set as the emergency stop signal input pin (emg0 pin), an emg input activates the emg detection circuit of pmd0 and forcefully disables output on pa[5:0] even if these pins are not set for pmd0 output. the emg detection circuit of pmd0 is enabled by setting the emgcr0.emgen bit to 1 in addition to setting pa6 as the emg0 pin. figure 8.12.1 shows a block diagram of the emg detection circuit. emg detection circuit paecr tmp19a71 tmp19a71 8-37 8.12.3 register settings for pa6 when pa6 is set as the emg0 pin (pafr.pafr 6=1), other registers related to pa6 (i.e., pacr6, paier6, padssr6, papucr6) cannot be ch anged. clearing the pafr6 bit to 0 enables writes to these registers again. table 8.12.2 shows the register settings for pa6 according to the select ed function. table 8.12.2 register settings for pa6 general-purpose i/o port emg pin pacr.pacr6 x 0 (note ) paier.paier6 x 0 (note) padssr.padssr6 x x (note) papucr.papucr6 x 0 (note) pafr.pafr6 0 1 note: must be set before the pafr.pafr6 bit is set. general procedure for setting pa6 as the emg0 pin (falling edge sensitive) paeclr=0x55 0xaa ; release lock paecr tmp19a71 tmp19a71 8-38 when emg0 is set as level sensitive, port a is put in the emg condition only while emg0 is active (paecr.emgfa=1). thus, there is no need to clear the emg condition in port a by setting paecr.emgea to 1. howe ver, when the emg detection circuit is enabled in pmd, the emg condition must be cleared in pmd by setting emgcr1.emgrs to 1 after making sure that emg0 is inactive. when emg0 is set as edge sensitive, make sure that emg0 is inactive before making an emg condition setting. 8.12.4 difference between p93 (tb0in) and pa6 (emg0)/pb6 (emg1) p93 can also be used as the emg pin. the main difference between p93 and pa6/pb6 is that port 9 generates an emg interrupt as shown in figure 8.12.2. in the case of pa6/pb6, when the em g function is disabled in pmd (emgcr.emgen=0), no emg interrupt (intemgx) is generated whereas p93 causes an emg interrupt (i nttbe0) to be generated as soon as port 9 is put in the emg condition. emg detection circuit p9ecr tmp19a71 tmp19a 71 9-1 9. debug support unit (dsu ) tmp 19a71 is supplied with dsu ( debug supp ort unit ) mode. this function makes a subset of ports be dsu control pins. the dsu mode has two types; lv.1 (12- pin mode) and lv.0 (5 -pin mode). using 12 control pins, lv.1 provides more pow erful debug function than lv.0 does. the mode can be used like selsecting lv.1 in the first stage of debug operation where it needs larger debug information, and lv.0 in the last stage of debug operation since lv.0 has less pin restriction. 9.1 dsu (ejtag) mode setting to set the dsu mode, l must be set to eje of an external pin that is in reset cycle, and then tmp 19a71 becomes in dsu (ejtag) mode when it is started up with the dsu level, dsu -probe first. if dsu -probe is not connected, it starts from lv.0. note 1: dsu disabled must be released for the mask version. 9.1.1 pin status upon the dsu (ejtag) mode startup when tmp 19a71 starts in dsu (ejtag) mode, a specific pin register automatically changes into dsu control pin regardless of its setting. in addition, as a read value of register, a set value can be read. 9.1.2 motor breakage prevention tmp 19a71 has a mechanism that automatically turns its moter output off (rxcrn=0) to prevent the motor breakage upon the break execution (including onestep execution) in the dsu mode. intended ports are p94(tb0out), pa[5:0](pmd0), and pb[5:0](pmd1). their pxcrn becomes 0 (output of a prescribed bit n of portx disabled) only when they are set to the motor control outputs ( tb0out, pmd0, and pmd1 ). to resume the motor control, 1 is to be set to pxcrn. the motor control output, however, does not restart when it is started after changing the port setting in ide. the port must be set during the programming. tmp19a71 tmp19a71 9-2 9.2 pin status in reset cycle 9.2.1 pins whose status change according to mode; normal and dsu table 9.2 . 1 shows the status change upon resetting of each pin. even when a pin is not connected to dsu -probe in dsu mode, its status becomes the same as in dsu mode shown in table 9.2 .1. table 9.2 .1 pin status in reset cycle pin normal mode (eje=?h?) dsu mode (eje=?l?) p20(tck) hi-z hi-z(tck) p21(tms) hi-z hi-z(tms) p22(tdi) hi-z hi-z(tdi) p23(tdo) ( ?? 2) hi-z undefined (t do) p24(dint) hi-z hi-z(dint) p30(tpc) hi-z hi-z p31(pcst0) hi-z hi-z p32(pcst1) hi-z hi-z p33(pcst2) hi-z hi-z p34(dclk) hi-z hi-z p86(tx2/pcst3) hi-z hi-z p87(sclk2/cts2/pcst4) hi-z hi-z p94(tb0out/boot) external ?h ? fixed *note 1 external ?h ? fixed *note 1 other general -purposed i/o port hi-z hi-z eje external ?h ? fixed external ?l? fixed reset external ?l? fixed external ?l? fixed test0 external ?l? fixed external ?l? fixed test1 external ?l? fixed external ?l? fixed note 1: these pins must be fixed externally until the reset is released. note 2: even during the reset, the behavior of p23(tdo) shall be unstable until its internal current becomes stable. tmp19a71 tmp19a 71 9-3 9.2.2 pin status upon the connection to dsu -probe upon the connection of dsu -probe, an output value of a port changes until the connection is completed. since, as for pins used in lv.1 , there is only changes in output values of a pin to be used but no change in switching timing, here dclk(p34) is described. 9.2.2.1 dsu -probe connection (lv.1) debug start reset button is pressed with a debugger. vcc reset proben( ??1 ) dclk(p34) ?? 10 ms ( t . b.d ) hi-z reset by dsu-probe note1: internal signal debug lv.0?1 figure 9.2 . 1 shows, in the connection in lv.1 , dsu -probe sets 1 to proben of an internal register after the second reset being performed that follows the power supply. when the second reset is released, a dsu control pin used in lv.1 mode switches to the one for dsu control and starts communication with dsu -probe . note1: for the first reset releasing cycle, refer to the operation manual of dsu -probe you are using. debug start reset button is pressed with a debugger. vcc reset proben (?? 1 ) dclk(p34) ?? 10 ms(t .b.d) hi-z reset by dsu-probe note1: internal signal debug lv.0?1 figure 9.2 .1 dsu -probe connection (lv.1) 9.2.2.2 dsu -probe connection (lv.0) as figure 9.2 .2 dsu -probe connection (lv.0) upon the connection in lv. 0 mode, dsu -probe sets 1 to proben of an internal register after the second reset being performed that follows the power supply. by setting 0 to eje, dsu control pin to be used in lv.0 mode behaves as the one for dsu control immediately after t he power supply. note1: for the first reset releasing cycle, refer to the operation manual of dsu -probe you are using. tmp19a71 tmp19a71 9-4 debug start reset button is pressed by a debugger. vcc reset proben (?? 1 ) dclk(p34) ?? 10 ms(t .b.d) hi-z reset by dsu-probe note 1: internal signal figure 9.2 .2 dsu -probe connection (lv.0) tmp19a71 tmp19a 71 9-5 9.2.3 dsu -probe disabled this functions when debugging by using dsu -probe. it is an i/f exclusive for connecting to dsu -probe. for details of debug utilizing dsu -probe, refer to the operation manual of dsu -p robe you are using. here, dsu -probe enabled/disabled in dsu (ejtag) mode is described. 1. dsu -probe enabled/disabled this device can debug by using dsu -probe on borad. therefore, it has the function that disables use of dsu -probe (hereinafter referred to as dsu disabled), which allows no third party to read data of incorporated flash easily. validating the dsu disabled makes it impossible to use dsu -probe. 2. dsu disabled (disabling debug that uses dsu -probe) user can validate the writer security functin o f flash itself by issuing the protect commands described later to all the two blocks of the flash upon the program debug completion. in this condition, even if a reading is tryed by using a writer, data of incorporated flash cannot be read. debug is impossible by using dsu -brobe after its power is turned off unless dsu disabled is set upon the next powering and dsu disabled is released. 3. dsu enabled (enabling debug that uses dsu -probe) dsu disabled is fail- safe to prevent any accidental release caused wi th such as runaway. to release dsu disabled, 0 must be set to the dsu security mode register, seqmod tmp19a71 tmp19a71 9-6 31 30 29 28 27 26 25 24 seqmod bit symbol - - - - - - - - (0xffff_e510) read/write r reset value 0 0 0 0 0 0 0 0 function 23 22 21 20 19 18 17 16 bit symbol - - - - - - - - read/write r reset value 0 0 0 0 0 0 0 0 function 15 14 13 12 11 10 9 8 bit symbol - - - - - - - - read/write r reset value 0 0 0 0 0 0 0 0 function 7 6 5 4 3 2 1 0 bit symbol - - - - - - - dsuoff read/write r r/w reset value 0 0 0 0 0 0 0 1 function 1: dsu disabled 0: dsu enabled note 1: this register must be accessed by 32-bit system. it is not accessible with any bit operation instruction. 31 30 29 28 27 26 25 24 seqcnt bit symbol - - - - - - - - (0xffff_e514) read/write w reset value - - - - - - - - function must be written as 0x0000_00c5 . 23 22 21 20 19 18 17 16 bit symbol - - - - - - - - read/write w r eset value - - - - - - - - function must be written as 0x0000_00c5 . 15 14 13 12 11 10 9 8 bit symbol - - - - - - - - read/write w reset value - - - - - - - - function must be written as 0x0000_00c5 . 7 6 5 4 3 2 1 0 bit symbol - - - - - - - - read/write w reset value - - - - - - - - function must be written as 0x0000_00c5 . note 1: this register must be accessed by 32-bit system. it is not accessible with any bit operation instruction. tmp19a71 tmp19a 71 9-7 5. example of use by user example of how to use dsu -probe using this function is shown below. figure 9.2 .3 example use of dsu disabled [dsu - probe enabled] dsu is enabled until power off (flash product)/external reset (mask product ?j tmp19a71 dsu disabled by power -on ?i disabled by reset for maskrom products ?j determination program of dsu enabled (user made) is dsu disabled released? release of dsu disabled as writing in seqmod and seqcnt is executed. [dsu - pr obe disabled] remained dsu disabled n external port data tmp19a71 10. dma controller (dmac) the tmp19a71 contains an eight-channel dma controller (dmac). 10.1 features the dmac has the following features: (1) ei ght independent dma channels (2) t ransfer requests: internal transfer requests: software initiated external transfer requests: interrupt signals from on-chip i/o peripherals and external interrupt pins (3) dual-address mode (4) memory-to-memory, memory-to-i/o, and i/o-to-memory transfers (5) transfer width: ? me mory: 32-bit ? i/ o peripherals: 8-, 16-, and 32-bit (6) address pointers can increment, decrement or remain constant. the user can program the bit positions at which address in crement or decrement occurs. (7) fi xed channel priority tmp19a71 10-1 tmp19a71 10.2 implementation 10.2.1 on-chip dmac interface figure 10.2.1 shows how the dmac is internally connected with the tx19a core processor and th e interrupt controller (intc). * internal signals figure 10.2.1 dmac connections within the tmp19a71 the dmac provides eight independently programmable channels. with each dma chann el, there are two associat ed signals: a dma request ( intdreqn ) and a dma acknowledge ( dackn ), where n is a channel number from 0 to 7. channel priority is fixed. channel 0 has the highest priority, and channel 7 has the lowest priority. the tx19a core processor has a snoop function. the snoop function releases the tx19a core processor?s data bus to the dmac, enabling the dmac to access the internal rom and internal ram connected with the tx 19a core processor. the dmac can select whether or not to use this snoop function. for details, see ?10.2.3 snoop function?. the dmac can use two types of bus request: sreq and greq. greq is used when the snoop fu nction is not used, and sreq is used when the snoop function is used. sreq has higher priority than greq. note: in debug mode (cp0?s debug.dm=1), peripheral functions cannot be accessed properly with sreq. in debug mode, do not use sreq to access peripheral functions. tx19a core processor address data bus grant control bus request bus release request busgnt busrel * intdreq [7 : 0] * dack [7 : 0] * dmac bus grant acknowledge haveit * interrupt controller (external requests) on-chip i/o peripheral interrupt requests external interrupt requests busreq * * tmp19a71 10-2 tmp19a71 10.2.2 dmac block the dmac block diagram is shown in figure 10.2.2 . channel 3 channel 2 destination address register (darx source address register (sarx byte count register (bcrx channel control register (ccrx 31 0 channel 0 dma control register (dcr data holding register (dhr channel status register (csrx dma transfer control register (dtcrx x 0 to 7 channel 4 channel 5 channel 6 channel 7 channel 1 figure 10.2.2 dmac block diagram 10.2.3 snoop function the tx19a core processor has the snoop function, which releases the tx19a core processor?s data bus to the dmac. when the snoop function is used, the tx19a core processor stops operating until the dmac relinquishes the bus. the snoop function enables the dmac to access the internal ram and internal rom so that these locations can be specified as source and destination addresses. when the snoop function is not used, the dmac cannot access the internal ram and int ernal rom. however, even when the snoop function is not used, the g-bus is released to the dmac. if the tx19a core processor tries to access memory or i/o through the g-bus, pipeline operation will be stalled until the dmac relinquishes bus mastership. note: when the snoop function is not used, the tx19a core processor does not release the data bus to the dmac. in this case, if an internal ram or rom lo cation is specified as a dma source or destination address, no acknowledge signal will be returned for the bus request from the dmac and bus operation will be locked. tmp19a71 10-3 tmp19a71 10.2.4 register description the dmac has fifty 32-bit registers, as listed in table 10.2.1 . table 10.2.1 dmac register map (1/2 ) address symbol register name 0xffff_d600 ccr0 channel control register (channel 0) 0xffff_d604 csr0 channel status register (channel 0) 0xffff_d608 sar0 source addr ess register (channel 0) 0xffff_d60c dar0 destination address register (channel 0) 0xffff_d610 bcr0 byte count register (channel 0) 0xffff_d618 dtcr0 dma transfer control register (channel 0) 0xffff_d620 ccr1 channel control register (channel 1) 0xffff_d624 csr1 channel status register (channel 1) 0xffff_d628 sar1 source addr ess register (channel 1) 0xffff_d62c dar1 destination address register (channel 1) 0xffff_d630 bcr1 byte count register (channel 1) 0xffff_d638 dtcr1 dma transfer control register (channel 1) 0xffff_d640 ccr2 channel control register (channel 2) 0xffff_d644 csr2 channel status register (channel 2) 0xffff_d648 sar2 source addr ess register (channel 2) 0xffff_d64c dar2 destination address register (channel 2) 0xffff_d650 bcr2 byte count register (channel 2) 0xffff_d658 dtcr2 dma transfer control register (channel 2) 0xffff_d660 ccr3 channel control register (channel 3) 0xffff_d664 csr3 channel status register (channel 3) 0xffff_d668 sar3 source addr ess register (channel 3) 0xffff_d66c dar3 destination address register (channel 3) 0xffff_d670 bcr3 byte count register (channel 3) 0xffff_d678 dtcr3 dma transfer control register (channel 3) 0xffff_d680 ccr4 channel control register (channel 4) 0xffff_d684 csr4 channel status register (channel 4) 0xffff_d688 sar4 source addr ess register (channel 4) 0xffff_d68c dar4 destination address register (channel 4) 0xffff_d690 bcr4 byte count register (channel 4) 0xffff_d698 dtcr4 dma transfer control register (channel 4) 0xffff_d6a0 ccr5 channel control register (channel 5) 0xffff_d6a4 csr5 channel status register (channel 5) 0xffff_d6a8 sar5 source addr ess register (channel 5) 0xffff_d6ac dar5 destination addr ess register (channel 5) 0xffff_d6b0 bcr5 byte count register (channel 5) 0xffff_d6b8 dtcr5 dma transfer control register (channel 5) 0xffff_d6c0 ccr6 channel control register (channel 6) 0xffff_d6c4 csr6 channel status register (channel 6) 0xffff_d6c8 sar6 source addr ess register (channel 6) 0xffff_d6cc dar6 destination address register (channel 6) 0xffff_d6d0 bcr6 byte count register (channel 6) 0xffff_d6d8 dtcr6 dma transfer control register (channel 6) tmp19a71 10-4 tmp19a71 table 10.2.2 dmac register map (2/2) address symbol register name 0xffff_d6e0 ccr7 channel control register (channel 7) 0xffff_d6e4 csr7 channel status register (channel 7) 0xffff_d6e8 sar7 source addr ess register (channel 7) 0xffff_d6ec dar7 destination addr ess register (channel 7) 0xffff_d6f0 bcr7 byte count register (channel 7) 0xffff_d6f8 dtcr7 dma transfer control register (channel 7) 0xffff_d700 dcr dma control register (dmac) 0xffff_d704 reserved 0xffff_d70c dhr data holding register (dmac) note: although the dmac registers are 32-bit wide, they can be accessed in 8-bit or 16-bit units. for example, the ccr0[31:0] register can be divided into four 8-bit registers: ccr0[7:0]=ccr0ll, ccr0[15:8]=ccr0lh, ccr0[23:16]=ccr0hl and ccr0[31:24]=ccr0hh. for details, see ?18. i/o register summary?. tmp19a71 10-5 tmp19a71 there are basically no functional differences among the eight dmac channels. in the following register descriptions, only dmac0 is explained. 10.2.5 dma control register (dcr) 7 6 5 4 3 2 1 0 dcr bit s ymbol rst7 rst6 rst5 rst4 rst3 rst2 rst1 rst0 (0xffff_d700) read/write w w w w w w w w reset value 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 bit symbol - read/write r reset value 0x00 23 22 21 20 19 18 17 16 bit symbol - read/write r reset value 0x00 31 30 29 28 27 26 25 24 bit symbol rstall - read/write w r reset value 0 0 0 0 0 0 0 0 bit mnemonic field name description 31 rstall reset all performs a software reset of the dmac. when the rstall bit is set to 1, all the dmac internal registers are initialized to their reset values. any transfer requests are removed and all the eight dma channels are put in idle state. 0: don't care 1: reset the dmac. 7 rst7 reset 7 performs a software reset of dmac channel 7. when the rst7 bit is set to 1, all the dmac cha nnel 7 internal registers are initialized to their reset va lues. any transfer requests for channel 7 are removed and channel 7 is put in idle state. 0: don't care 1: reset dmac channel 7. 6 rst6 reset 6 performs a software reset for dmac channel 6. when the rst6 bit is set to 1, all the dmac channel 6 internal registers are initialized to their reset va lues. any transfer requests for channel 6 are removed and channel 6 is put in idle state. 0: don't care 1: reset dmac channel 6. 5 rst5 reset 5 performs a software reset for dmac channel 5. when the rst5 bit is set to 1, all the dmac channel 5 internal registers are initialized to their reset va lues. any transfer requests for channel 5 are removed and channel 5 is put in idle state. 0: don't care 1: reset dmac channel 5. tmp19a71 10-6 tmp19a71 bit mnemonic field name description 4 rst4 reset 4 performs a software reset of dmac channel 4. when the rst4 bit is set to 1, all the dmac channel 4 internal registers are initialized to their reset values. any transfer requests for channel 4 are removed and channel 4 is put in idle state. 0: don't care 1: reset dmac channel 4. 3 rst3 reset 3 performs a software reset of dmac channel 3. when the rst3 bit is set to 1, all the dmac channel 3 internal registers are initialized to their reset values. any transfer requests for channel 3 are removed and channel 3 is put in idle state. 0: don't care 1: reset dmac channel 3. 2 rst2 reset 2 performs a software reset of dmac channel 2. when the rst2 bit is set to 1, al the dmac channel 2 internal registers are initialized to their reset values. any transfer requests for channel 2 are removed and channel 2 is put in idle state. 0: don't care 1: reset dmac channel 2. 1 rst1 reset 1 performs a software reset of dmac channel 1. when the rst1 bit is set to 1, all the dmac channel 1 internal registers are initialized to their reset values. any transfer requests for channel 1 are removed and channel 1 is put in idle state. 0: don't care 1: reset dmac channel 1. 0 rst0 reset 0 performs a software reset of dmac channel 0. when the rst0 bit is set to 1, all the dmac channel 0 internal registers are initialized to their reset values. any transfer requests for channel 0 are removed and channel 0 is put in idle state. 0: don't care 1: reset dmac channel 0. note 1: if a software reset command is written to the dcr register immediately after the completion of the transfer cycle of a dma transaction, the dma-done interrupt will not be cleared. in this case, the software reset only initializes channel registers and other settings. note 2: do not issue a software reset command to the dcr register via a dma transfer. note 3: this register does not support bit manipulation instructions. tmp19a71 10-7 tmp19a71 10.2.6 channel control register (ccr0) 7 6 5 4 3 2 1 0 ccr0 bit s ymbol sac dio dac trsiz dps (0xffff_d600) read/write r/w r/w r/w r/w r/w reset value 0 0 00 00 00 15 14 13 12 11 10 9 8 bit s ymbol - exr - - - - stio sac read/write r/w r/w r/w r/w r/w reset value 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit s ymbol nien abien - - - - - - read/write r/w r/w r/w r/w r/w r/w reset value 1 1 1 0 0 0 1 0 31 30 29 28 27 26 25 24 bit symbol str - - - - - - - read/write w r w reset value 0 0 0 0 0 0 0 - bit mnemonic field name description 31 str channel start (reset value: ) enables the corresponding dma channel . setting this bit to 1 puts the dma channel in ready state. dm a transfer starts as soon as a transfer request is received. only a write of 1 is valid, and a write of 0 has no effect. this bit is alw ays read as 0. 1: enable the dma channel. 24 ? (reserved) this bit is reserved. it must al ways be written as 0. 23 nie0 normal completion interrup t enable (reset value: 1) 1: enable interrupts on normal conversion completion. 0: disable interrupts on normal conversion completion. 22 abie0 abnormal completion interrupt enable (reset value: 1) 1: enable interrupts on abnormal conversion completion. 0: disable interrupts on abnorma l conversion completion. 21 ? (reserved) this bit is reserved. it is reset to 1, but must always be written as 0. 20 : 18 ? (reserved) this bit is reserved. it must al ways be written as 0. 17 ? (reserved) this bit is reserved. it is reset to 1, but must always be written as 0. 16 : 15 ? (reserved) this bit is reserved. it must al ways be written as 0. 14 exr external request mode (reset value: 0) specifies a transfer request mode. 1: external transfer request (interrupt request) 0: internal transfer request (software start) 13 ? (reserved) this bit is reserved. it must al ways be written as 0. tmp19a71 10-8 tmp19a71 bit mnemonic field name description 12 ? (reserved) this bit is reserved. it is reset to 0, but must always be written as 1. 11 sreq snoop request (reset value: 0) specifies whether or not to use the snoop function. when the snoop is used, the tx 19a core processo r releases the data bus to the dmac. 1: use the snoop function. (sreq) 0: do not use the snoop function. (greq) 10 relen release request enable (reset value: 0) specifies whether or not to respond to a bus release request from the tx19a core processor. this bit is valid only when greq is used. when sreq is used, the tx 19a core processor cannot issue a bus release request. 1: respond to a bus release request from the tx19a core processor w hen the dmac has bus mastership. when the tx19a core processor issues a bus release request, the dmac relinquishes the bus upon comp letion of the current bus operation. 0: do not respond to a bus release request from the tx19a core processor. 9 stio source i/o (reset value: 0) specifies the type of the source device. 1: i/o device 0: memory 8 : 7 sac source address count (reset value: 00) specifies the manner in which the source address changes after each cy cle. 1x: fixed 01: decremented 00: incremented 6 dio destination i/o (reset value: 0) specifies the type of the destination device. 1: i/o device 0: memory 5 : 4 deac destination address count (reset value: 00) specifies the manner in which the destination address changes after each c ycle. 1x: fixed 01: decremented 00: incremented 3 : 2 trsiz transfer size (reset value: 00) specifies the amount of data to be transferred in response to a dma request. 11: 8 bits (1 byte) 10: 16 bits (2 bytes) 0x: 32 bits (4 bytes) 1 : 0 dps device port size (reset value: 00) specifies the bus width of the i/o device specified as a source or destination device. 11: 8 bits (1 byte) 10: 16 bits (2 bytes) 0x: 32 bits (4 bytes) tmp19a71 10-9 tmp19a71 note1: the ccrn register must be programmed before placing the dmac in ready state. note 2: the dps field has no meaning or effect on memory-to-memory transfers. note 3: when ccrn.dio=1 (i/o device), do not specify the internal ram or cg/irc registers as a destination device. note 4: this register does not support bit manipulation instructions. 10.2.7 channel status register (csr0) 7 6 5 4 3 2 1 0 csr0 bit symbol - - - - - - - - (0xffff_d604) read/write r r/w reset value 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 bit symbol - - - - - - - - read/write r reset value 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol nc abc - bes bed conf - - read/write r/w r reset value 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol act - - - - - - - read/write r reset value 0 0 0 0 0 0 0 0 bit mnemonic field name description 31 act channel active (reset value: 0) indicates whether or not the dma channel is in ready state. 1: the dma channel is in ready state. 0: the dma channel is not in ready state. 23 nc normal completion (reset value: 0) if set, the dma channel has terminated by normal completion. if the nie0 bit in the c cr0 register is set, an interrupt is generated. the nc bit is cleared by writing a 0 to it. clearing the nc bit causes the interrupt to be cleared. the nc bit must be cleared to prior to starting the next transfer. an attempt to set th e str bit in the cce0 when nc=1 will cause an error. a write of 1 has no effect on this bit. 1: the dma channel has terminated by normal completion. 0: the dma channel has not terminated by normal completion. tmp19a71 10-10 tmp19a71 bit mnemonic field name description 22 abc abnormal completion (reset value: 0) if set, the dma channel has terminated with an error. if the abie0 bit i n the ccr0 register is set, an interrupt is generated. the abc bit can be cleared by writi ng a 0 to it. clearing the abc bit causes the interrupt to be cleared and the bes, bed and conf bits to be also cleared. the abc bit must be cleared prior to starting the next transfer. an attempt to set the str bit in the ccr0 when abc=1 will cause an error. a write of 1 has no effect on this bit. 1: the dma channel has terminated with an error. 0: the dma channel has not terminated with an error. 21 ? (reserved) this bit is reserved. it must al ways be written as 0. 20 bes source bus error (reset value: 0) 1: a bus error has occurred during the source read cycle. 0: a bus error has not occurred during the source read cycle. 19 bed destination bus error (reset value: 0) 1: a bus error has occurred during the destination write cycle. 0: a bus error has not occurred du ring the destination write cycle. 18 conf configuration error (reset value: 0) 1: a configuration error is present. 0: no configuration error is present. 2 : 0 ? (reserved) this bit is reserved. it must al ways be written as 0. tmp19a71 10-11 tmp19a71 10.2.8 source address register (sar0) 7 6 5 4 3 2 1 0 sar0 bit symbol saddr (0xffff_d608) read/write r/w reset value 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 bit symbol saddr read/write r/w reset value 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol saddr read/write r/w reset value 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol saddr read/write r/w reset value 0 0 0 0 0 0 0 0 bit mnemonic field name description 31 : 0 saddr source address (reset value: ) contains the physical address of the source device. the address changes as programmed in the sa c and trsiz fields in the ccr0 and the sacm field in the dtcr0. tmp19a71 10-12 tmp19a71 10.2.9 destination address register (dar0) 7 6 5 4 3 2 1 0 dar0 bit symbol daddr (0xffff_d60c) read/write r/w reset value 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 bit symbol daddr read/write r/w reset value 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol daddr read/write r/w reset value 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol daddr read/write r/w reset value 0 0 0 0 0 0 0 0 bit mnemonic field name description 31 : 0 daddr destination address (reset value: ) contains the physical address of the destination device. the address changes as programmed in t he dac and trsiz fields in the ccr0 and the dacm field in the dtcr0. tmp19a71 10-13 tmp19a71 10.2.10 byte count register (bcr0) 7 6 5 4 3 2 1 0 bcr0 bit symbol bc (0xffff_d610) read/write r/w reset value 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 bit symbol bc read/write r/w reset value 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol bc read/write r/w reset value 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol - - - - - - - - read/write r reset value 0 0 0 0 0 0 0 0 bit mnemonic field name description 23 : 0 bc byte count (reset value: ) contains the number of bytes left to transfer on the dma channel. the count is decremented b y 1, 2 or 4 (as determined by the trsiz field in the ccr0 register) for each successful transfer. tmp19a71 10-14 tmp19a71 10.2.11 dma transfer control register (dtcr0) 7 6 5 4 3 2 1 0 dtcr0 bit symbol - - dacm sacm (0xffff_d618) read/write r r/w reset value 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 bit symbol - - - - - - - - read/write r reset value 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol - - - - - - - - read/write r reset value 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol - - - - - - - - read/write r reset value 0 0 0 0 0 0 0 0 bit mnemonic field name description 5 : 3 dacm destination address count mode selects the manner in which the destination address is incremented or decrement ed. 000: counting begins with bit 0 of the dar0. 001: counting begins with bit 4 of the dar0. 010: counting begins with bit 8 of the dar0. 011: counting begins with bit 12 of the dar0. 100: counting begins with bit 16 of the dar0. 101: reserved 110: reserved 111: reserved 2 : 0 sacm source address count mode selects the manner in which the source address is incremented or decremented. 000: counting begins with bit 0 of the sar0. 001: counting begins with bit 4 of the sar0. 010: counting begins with bit 8 of the sar0. 011: counting begins with bit 12 of the sar0. 100: counting begins with bit 16 of the sar0. 101: reserved 110: reserved 111: reserved tmp19a71 10-15 tmp19a71 10.2.12 data holding register (dhr) 7 6 5 4 3 2 1 0 dhr bit sy mbol dot (0xffff_d70c) read/write r/w reset value 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 bit sy mbol dot read/write r/w reset value 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit sy mbol dot read/write r/w reset value 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit sy mbol dot read/write r/w reset value 0 0 0 0 0 0 0 0 bit mnemonic field name description 31 : 0 dot data on transfer (reset value: - ) contains data read from the source address during a dual-address operation. tmp19a71 10-16 tmp19a71 10.3 operation this section describes the operation of the dmac. 10.3.1 overview the dmac is a high-speed 32-bit dma contro ller used to quickly move large blocks of data between i/o peripherals and memory without intervention of the tx19a core processor. (1) devices supported for the source and destination the dmac handles data transfers from memory to memory and between memor y and i/o peripherals. the device from which data is transferred is referred to as a source device, and the device to wh ich data is transferred is referred to as a destination device. both memory and i/o peripherals can be a source or destination device. the dmac supports da ta transfers from memory to i/o peripherals, from i/o peripherals to memory, and from memory to memory, but not from i/o peripherals to i/o peripherals. dma protocols for memory and i/o peri ph erals differ in accessing an i/o peripheral. to access an i/o peripheral, the dmac asserts the dackn (n = channel number) signal to indicate that da ta is being transferred in response to a previous transfer request. because each dma channel has only one dackn signal, the dmac cannot handle data transfers between two i/o peripherals. interrupt requests can be programmed to be a trigger to initiate a dma process instead of requesting an interrupt to the tx19a core processor. if so programmed, the interrupt controller (intc) forwards a dma request to the dmac. the dma request coming from the intc is cleared when the intc receives a dackn from the dmac. consequently, a dma request for a transfer to/from an i/o peripheral is cleared after each dma bus cycle (i.e., every time the number of bytes programmed into the ccrn.trsiz field is transferred). on the other hand, during memory-to-memory transfer, the dackn signal is not asserted until the byte count register (bcrn) reaches zero. ther efore, memory-to-memory transfer can continuously move large blocks of data in response to a single dma request. the tmp19a71 on-chip i/o peripherals ar e hand led as memory. for example, data transfers between the tmp19a71 on-chip i/o peripheral and on-chip memory is discontinued after every dma bus cycle. nonetheless, until the bcrn register reaches zero , the dmac remains in ready state to wait for the next transfer request. data transfer is conti nued until the byte count register (bcrn) reaches zero. tmp19a71 10-17 tmp19a71 (2) exchanging bus mastership (bus arbitration) in response to a dma request, the dmac issues a bus request to the tx19a core processor. when the dmac receives a bus grant signal from the tx19a core processor, it assumes bus mastersh ip to service the dma request. the dmac can select whether or not to use the snoop function in requesting bas m asterhip to the tx19a core processor. the snoop function releases the tx19a core processor?s data bus to the dmac. this selection is made for each channel by programming the sreq bit in the ccrn register. the tx19a core processor may generate a b us release request to the dmac. whether or not to respond to a bus release request from the tx19a core processor is specified for each channel in the reien bit in the ccrn register. the setting of this bit is valid only when the snoop function is not used (greq). when the snoop function is used (sreq), the tx19a core processor cannot generate a bus release request signal. the dmac relinquishes the bus to the tx19a core processor when there is no pen ding dma request to be serviced. note1: the nmi interrupt is left pending while the dmac has control of the bus. note 2: do not place the tmp19a71 in halt mode while the dmac is operating. (3) transfer request generation each dma channel supports two types of request generation methods: internal and ext ernal. internal requests are those generated within the dmac. the dma channel is started as soon as the str bit in the ccrn register is set. the channel immediately requests the bus and begins transferring data. if a channel is programmed for external request and the str bit is set, the int dreqn signal asserted by the intc causes the channel to request the bus and begin a transfer. the dmac can be programmed to recognize a transfer request with the low level of the intdreqn signal. (4) data transfer mode the tmp19a71 dmac supports dual-address transfers, but not single-address transfers. the dual-address mode allows data to be transf erred from memory to memory and between memory and an i/o peripher al. in this mode, the dmac explicitly addresses both the source and destinatio n devices. the dmac also generates a dackn signal when accessing an i/o peripheral. in dual-address mode, a transfer takes place in two dma bus cycles: a source read cycle and a destination write cycle. in the source read cycle, the data being transferred is read from the source address and put into the dmac internal data holding register (dhr). in the destination write cycle, the dmac writes data in the dhr to a destination address. tmp19a71 10-18 tmp19a71 (5) dma channel operation the dmac has eight independent dma chan nels 0 to 7. setting the start (str) bit in the ccrn (n = channel number) enables a particular channel and puts it in ready state. when a dma request is detected in any o f the channels in ready state, the dmac arbitrates for the bus and begins a transfer. when no dma request is pending, the dmac relinquishes the bus to the tx19a core processor and returns to ready state. the channel can terminate by normal completion or from an error of a bus cycle. when a channel terminates, that channel is put in idle state. interrupts can be generated by error termination or by normal channel termination. figure 10.3.1 shows general state transitions of a dma channel. start transfer done idle ready transfer the dmac assumes bus mastership. the dmac gives up bus mastership. the dmac gives up bus matership. the dmac assumes bus mastershi p . figure 10.3.1 dma channel state transitions tmp19a71 10-19 tmp19a71 (6) summary of transfer modes the dmac can perform data transfers a ccording to the combination of mode settings, as shown in the table below. table 10.3.1 dmac mode combinations transfer request edge/level address mode data flow internal (software) ? memory-to-memory memory-to-memory memory- to-i/o external (interrupt) low level intdreqn dual i/o-to-memory (7) address change options address pointers can incre men t, decrement or remain constant. the sac and dac fields in the ccrn respectively se lect address change directions for the source address register (s arn) and the destination address register (darn). while memory addresses can be programmed to increment, decrement or remain constant, i/o addresses must be programmed to remain constant. when an i/o peripheral is selected as the source or destination device, the sac or dac field in the ccrn must be set to 1x (address fixed). the sacm and dacm fields in the dtcrn provides options to program bit positions at which the source and dest ination addresses are incremented or decremented after each transfer. the bit posi tion can be bit 0, 4, 8, 12, or 16. use of bit 0 is the regular increment/decrement mode in which the address changes by 1, 2, or 4, according to the setting of the ccrn.trsiz field. when bit 4, 8, 12 or 16 is selected, the specified bit of the address changes by 1 regardless of the ccrn.trsiz field. two examples of how increment/decrement modes affect address changes are shown below . example 1: when address bit 0 is selected in the sacm field and address bit 4 is selected in the dacm field sac: programmed to increment the source address dac: programmed to increment the destination address trsiz: programmed to a transfer size of 32 bits source address: 0xa000_1000 destination address: 0xb000_0000 sacm: 000 bit 0 is the source address bit at which address increment occurs. dacm: 001 bit 4 is the destination address bit at which address increment occurs. source destination 1st transfer 0xa000_1000 0xb000_0000 2nd transfer 0xa000_1004 0xb000_0010 3rd transfer 0xa000_1008 0xb000_0020 4th transfer 0xa000_100c 0xb000_0030 tmp19a71 10-20 tmp19a71 example 2: when address bit 8 is selected in the sacm field and address bit 0 is selected in the dacm field sac: programmed to decrement the source address dac: programmed to decrement the destination address trsiz: programmed to a transfer size of 16 bits source address: 0xa000_0000 destination address: 0xb000_0000 sacm: 000 bit 8 is the source address bit at which address increment occurs. dacm: 001 bit 0 is the destination address bit at which address increment occurs. source destination 1st transfer 0xa000_0000 0xb000_0000 2nd transfer 0x9fff_ff00 0xafff_fffe 3rd transfer 0x9fff_fe00 0xafff_fffc 4th transfer 0x9fff_fd00 0xafff_fffa 10.3.2 transfer request generation a dma request must be issued for the dmac to initiate a data transfer. each dma channel in the dmac supports two types of request generation method: internal and external. in either request generation mode, once a dma channel is started, a dma request causes the dmac to arbitrate for the bus and begin transferring data. internal request generation a channel is programmed for internal request by clearing the exr bit in the cc rn. in internal request generation mo de, a transfer request is generated as soon as the str bit in the ccrn is set. an internally generated request keeps a transfer request pending until the transfer is complet e. if no transition to a higher-priority dma channel or a bus master occurs, the channel will use 100% of the available bus bandwidth to transfer all data continuously. internally generated requests suppor t o nly memory-to-memory transfer. ? ? external request generation a channel is programmed for external request by setting the exr bit in the ccrn. in ext ernal request generation mode, setting the str bit in the ccrn puts the channel in ready sate. while in ready state, assertion of the intdreqn signal (where n is the channel number) coming from the interrupt controller (intc) causes a transfer request to be generate d. externally generated requests support data transfers from memory to memo ry and between memory and an i/o peripheral. the tmp19a71 can recognize a transfer request with the low level of intdreqn. the transfer size, i.e., the amount of data to be transferred in response to a transfer request, is programmed in the trsiz field in the ccrn. the transfer size can be 32 bits, 16 bits or 8 bits. transfer request generation by intdreqn is described in detail below. tmp19a71 10-21 tmp19a71 (1) t ransfer request coming from the intc a transfer request is removed by assertion of the dackn signal (where n is the channel number). dackn is asserted: 1) when an i/o peripheral bus cycle has completed and 2) when the byte count register (bcrn) has reached zero in memory-to-memory transfer. consequently, a memory-to-i/o or i/o-to-memory transfer request terminates after one dma bus cycle completes, whereas memory-to-memory transfer can continuously move large blocks of data in response to a single dma request. the intc might clear intdreqn before the dmac accepts it and begins a data transfer. it must be noted that, even if that happens, a dma bus cycle might be executed after the interrupt request has been cleared. tmp19a71 10-22 tmp19a71 10.3.3 dma address modes dma transfer is generally performed in eith er of two address mode s: dual-address mode and single-address mode. in du al-address mode, both the source and destination devices are explicitly addressed. in single-address mode, only either the source device or the destination device is explicitly addre ssed. the tmp19a71, however, supports dual-address mode only. in dual-address mode, two bus tr ansfers occur: a read from the source device and a write to the d estination device. in the source read cycle, data is read from the source address and placed in the dmac internal data holdin g register (dhr). then, in the destination write cycle, the data held in the dhr is written to the destination address. dmac data data bus (1) address (2) (2) (1) address bus source device destination device figure 10.3.3 2 dual-address transfer mode the transfer size programmed into the ccrn.trsiz field determines the am ount of data that is transferred from a source device in response to a dma request. the transfer size can be 32 bits, 16 bits or 8 bits. the internal dhr is a 32-bit register that serves as a buffer for the data being transferred from a s ource device to a destination device during dual-address mode. memory accesses occur in a manner to fulfill the ccrn.trsiz setting. memory-to-i/o and i/o-to-memory dma transfers are governed by the setting of the c crn.dps field in addition to the setting of ccrn.trsiz. the dps field defines the port size of a source or destin ation i/o peripheral. the i/o port size can be 32 bits, 16 bits or 8 bits. tmp19a71 10-23 tmp19a71 if the transfer size is equal to the i/o po rt size, an i/o access takes a single read or single write cycle. if the i/o port size is less than the programmed transfer size, the internal 32-bit dhr serves as a buffer for the data being transferred. for example, assume that the transfer size is programmed to 32 bits. if the source i/o port size is 8 bits and the destination memo ry width is 32 bits, then four 8-bit read cycles occur, followed by a 32-bit write cycle. the 32 bits of data are buffered in the dhr until the destination write cycle occurs. source and destination addresses can be progra mmed to increment or decrement after each transfer. the brcn is decremented by trsiz for each data transfer. it is forbidden to program the de vice port size (dps) to a value greater than the dma transfer size (trsiz). the relationships between trsiz and dps are summarized below. table 10.3.2 dma transfer sizes and device port sizes (in dual-address mode) trsiz dps number of i/o bus cycles 0x (32 bits) 0x (32 bits) 1 0x (32 bits) 10 (16 bits) 2 0x (32 bits) 11 (8 bits) 4 10 (16 bits) 0x (32 bi ts) setting prohibited 10 (16 bits) 10 (16 bits) 1 10 (16 bits) 11 (8 bits) 2 11 (8 bits) 0x (32 bi ts) setting prohibited 11 (8 bits) 10 (16 bi ts) setting prohibited 11 (8 bits) 11 (8 bits) 1 tmp19a71 10-24 tmp19a71 10.3.4 dma channel operation each dma channel is started by setting the str bit in the ccrn to 1. once started, the dmac checks the channel setups for co nfiguration errors. if no configuration error is present, the channel enters ready state. when a dma request is detected while in ready state, the dmac arbitrates for the bus and b egins transferring data. the channel can terminate by normal completion or from an error. the state of term ination is indicated in the csrn. channel startup a dma channel is started by setting the str bit in the ccrn. once started, the dmac checks the channel setups for configuration errors. if a configurat ion error is detected, the channel terminates abnormally. if no configuration error is present, the channel enters ready state. once a channel enters ready state, the act bit in the csrn is set to 1. if the channel is programmed for internal requests, the channel requests the bus and starts transferring data immediately. if the channel is programmed for external requests, intdreqn must be asserted before the channel requests the bus. channel termination a dma channel can terminate by normal comple t ion or from an error. the status of a dma operation can be determined by reading the csrn. a channel terminates abnormally if an attempt is made to set the str bit in the cc rn when the nc or abc bit in the csrn is set. normal termination a dma channel terminates by normal completion in the following case. normal complet ion always occurs at the boundary of transfers programmed into the ccrn. trsize field. data transfers have terminated, wi th the bcrn d ecremented to 0. ? ? abnormal termination the following summarizes the cases in which a dma channel terminates from an error . configuration errors a configuration error results when th e chan nel initialization contains inconsistencies or errors. a configuratio n error is reported before any data transfer takes place; therefore, in case of a configuration error, the sarn, darn and bcrn remain unaltered. when a dma channel has terminated from a configuration error, the abc and conf bits in the csrn are set. a configuration error occurs for the following cases: ? both the sio and dio bits in the ccrn are set to 1. ? the ccrn.str bit is set to 1 when the nc or abc bit in the csrn is set to 1. ? the bcrn contains a value that is not an integer multiple of the transfer size programmed into the ccrn.trsiz field. ? the sarn or darn contains a value that is not an integer multiple of the tmp19a71 10-25 tmp19a71 transfer size programmed in to the ccrn.trsiz field. ? the ccrn.trsiz and ccrn.dps fields contain illegal combinations. ? the ccrn.str bit is set to 1 when the bcrn contains a value of zero. ? bus errors when a dma channel has terminated from a bus error, the abc bit and the bes or the bed bit in the csrn are set. ? a bus error has been reported during a source read or destination write cycle. note: the contents of the bcrn, sarn and darn are not guaranteed when a channel has terminated due to a bus error. chapter 18 lists the reserved addresses that, if accessed, cause a bus error. 10.3.5 dma channel priority the dmac provides a fixed priority for th e eight channels, with channel 0 always having the highest priority and channel 7 the lowest. for example, when transfer requests occur on channels 0 and 1 simultan eously, the channel 0 request is serviced first. the channel 1 request is left pending. in order for the channel 1 request to be serviced, it must be maintained until data transfer completes on channel 0. remember that the internally generated request is kept until the servicing of the request is finished. external transfer requests come from the interrupt controller (intc). the intc can program any interrupts to be used as a dma trigger instead of as an interrupt request. if such an interrupt is programmed to be edge-sensitive, the intc internally maintains a transfer request. however, a level-sensitive interrupt is not held in the intc; thus the interrupt request signal must remain asserted until the servicing of the dma request begins. a higher-priority channel always gets the attention of the dmac. if a transfer requ est occurs on channel 0 while a requ est on channel 1 is being serviced, the servicing of the channel 1 request is suspended temporarily in order to service the channel 0 request first. after the channel 0 request has been serviced, channel 1 resumes the remaining data transfer. channel transitions take place at the boundary of a transfer size programmed for the curr ent channel being serviced; that is, after all data in the dhr are written to a destination. interrupts the dmac can generate an interrupt requ est (intdman) to the tx19a core processor upon completion of a channel operation: either by normal channel termination or by abnormal termination of a bus cycle. normal completion interrupt when a channel operation terminates by n ormal completion, the nc bit in the csrn is set to 1. at this time, if the nien bit in the ccrn is set, an interrupt request is generated to the tx19a core processor. ? ? abnormal completion interrupt when a channel operation terminates abnormally, the abc bit in the csrn register is set to 1. at this time, if the abien bit in the ccrn is set, an interrupt request is generated to the tx19a core processor. tmp19a71 10-26 tmp19a71 10.4 dma transfer timing all dmac operations are synchronous to the rising edges of the internal system clock. 10.4.1 dual-address mode memory-to-memory transfer ? ? figure 10.4.1 shows a dma cycle from one external 16-bit memory to another, with th e transfer size programmed to 16 bits. a block of data is transferred until the bcrn register reaches 0. a [23 : 0] cs0 rd wr / hwr tsys dat a data write read d [15 : 0] cs1 figure 10.4.1 memory-to-memory transfer (dual-address mode) memory-to-i/o transfer figure 10.4.2 shows a dma cycle from a 16-bit memory to an 8-bit i/o per ipheral, with the transfer size programmed to 16 bits. read write data data tsys data write a [23 : 0] cs0 cs1 rd wr d [15 : 0] figure 10.4.2 memory-to-i/o transfer (dual-address mode) tmp19a71 10-27 tmp19a71 i/o-to-memory transfer ? figure 10.4.3 shows a dma cycle from an 8- bit i/o periph eral to a 16-bit memory, with the transfer si ze programmed to 16 bits. a [23 : 0] cs0 rd wr / hwr read read dat a tsys dat a dat a write d [15 : 0] cs1 figure 10.4.3 i/o-to-memory transfer (dual-address mode) tmp19a71 10-28 tmp19a71 10.4.2 programming example the following illustrates the programming requir ed to transfer data from an sio receive buffer (sc1buf) to the on-chip ram. (1) dmac settings: dma channel used: channel 0 ? ? ? ? ? ? ? source address: sc1buf destination address: 0xffff_ 9800 (physica l addre ss) number of bytes transferred: 256 (2) sio settings: data format: 8 bits, uart sio channel used: channel 1 transfer rate: 9600 bps dma channel 0 is used for the transfer. the sio1 receive interrupt is used as a trigger to start th e dma channel 0. (3) dma channel 0 settings: dcr 0x8000_0000 /* reset dmac * / imr56 15 7 0 xxxx, xxxx, x100, x100 /* interrupt level = 4 (arbitrary) * / iclr 0xe0 /* ivr [8:0] * / dtcr0 0x0000_0000 /* dacm = 000 * / /* sacm = 000 * / sar0 0xffff_f208 /* physical address of sc1buf */ dar0 0xffff_9800 /* physical address of destination */ bcr0 0x0000_00ff /* 256 (number of bytes to be transferred) / ccr0 0x80c0_5b0f (contents) 3 1 2 7 23 19 1 0 0 0 0 00 011000 000 1 5 1 1 7 3 0 1 0 1 1 x 1 1 x 0001 111 (4) sio channel 1 settings: imr51 31 15 xxxx, xxxx, x101, x000 /* use intrx1 as a dma trigger and select dma ch.0 * / iclr 0xcc /* ivr [8:0]; clear intrx1 * / sc1mod0 0x29 /* uart mode, 8-bit data format * / sc1cr 0x00 br1cr 0xb5 /* @imclk = 28 mhz (approx. 9615 bps) */ br1add 0x05 /* baud rate generator divisor */ tmp19a71 10-29 tmp19a71 11. 16-bit timer/even t counters (tmrbs) the tmp19a71 has a 16-bit timer/event counter consis ting of four identical channels (tmrb0 to tmrb3). each channel has the follow ing three basic operating modes: 16-bit interval timer mode ? ? ? ? ? 16-bit event counter mode 16-bit programmable pulse generation (ppg) mode each channel has capture capability, which enables the following operations: pulse width measurement one-shot pulse generation from an external trigger pulse figure 11.1.1 shows a bl ock diagram of the tmrb0. the main components of a tmrbn block are a 16- bit up-c ounter, two 16-bi t timer registers (one of which is double-buffered), two 16-bit capture registers, two comparators, capture control logic and timer flip-flop logic. each of the four channels (tmrb0 to tmrb3) is independently programmable and functionally equ ivalent except for the differences shown in table 11.1.1 . in the sections that follow, any re ferences to the tmrb0 also apply to other channels. table 11.1.1 pins and registers for the tmrb0 to tmrb3 channel specifications tmrb0 tmrb1 tmrb2 tmrb3 external clock/ capture trigger input tb0in (shared with p93) tb1in (shared with p70) tb2in (shared with p71) tb3in (shared with p72) external pins timer flip-flop output tb0out (shared with p94) tb1out (shar ed w ith p84) tb2out(shared with pa7) tb3out (shared with pb7) timer run register tb0run (0xffff_c700) tb1run (0x ffff_c720) tb2run (0xffff_c740) tb3run (0xffff_c760) timer mode register tb0mod (0xffff_ c704) tb1mod (0xffff_c724) tb2mod (0x ffff_c744) tb3mod (0xffff_c764) timer flip-flop control register tb0ff (0xffff_c708) tb1ff (0xffff_c728) tb2ff (0xffff_c748) tb3ff (0xffff_c768) timer registers tb0reg0 (0xffff_c70c) tb0reg1 (0xffff_c710) tb1reg0 (0xffff_c72c) tb1reg1 (0xffff_c730) tb2reg0 (0xffff_c74c) tb2reg1 (0xffff_c750) tb3reg0 (0xffff_c76c) tb3reg1 (0xffff_c770) capture registers tb0cp0 (0xffff_c714) tb0cp1 (0xffff_c718) tb1cp0 (0xffff_c734) tb1cp1 (0xffff_c738) tb2cp0 (0xffff_c754) tb2cp1 (0xffff_c758) tb3cp0 (0xffff_c774) tb3cp1 (0xffff_c778) registers (addresses) counter tb0cnt (0xffff_c71c) tb1cnt (0xffff_c 73c) tb2cnt (0xffff_c75c) tb3cnt (0xffff_c77c) tmp19a71 11-1 tmp19a71 11.1 block diagram figure 11.1.1 shows a block diagram of the 16-bit timer/event counter (tmrb0). figure 11.1.1 tmrb0 block diagram (tb0cmp0) (tb0cmp1) imbus imbus run/ clear match detect 16-bit comparator imbus im bus tb 0cp0 16-bit timer register tb0reg0 16-bit comparator tb0cp1 register buffer 0 16-bit timer register tb0reg1 match detect count clock tb0mod tmp19a71 11.2 timer components (1) prescaler the tmrb0 has a 6-bit prescaler that slows th e rate of a clocking source to the counter. the prescaler clock source is the imclk selected by the prs2 field in the clkprsc register within the clock generator. the prescaler output clock can be selected from imclk, imclk/2, imcl k/4, imclk/8, imclk/16, imclk/32 and imclk/64 by programming the clk field in the tb0mod register. (2) up-counter (tb0cnt) the tmrb0 contains a 16-bit up-counter, which is driven by the clock selected by the clk field in the tb0mod register. the clock input to the tb0cnt can be selected from seven prescaler outputs (imclk, imclk/2, imclk/4, imcl k/8, im clk/16, imclk/32 an d imclk/64) or the external clock applied to the tb0in pin. the run bit in the tb0run register is used to start the tb0cnt and to stop and clear the tb0cnt. the tb0cnt is cleared to 0000h, if so enabled, when it reaches the value in the tb0reg0 or tb0reg1 register. this clearing can be enabled and disabled by the cle bit in the tb0mod register. if the clearing is disabled, the tb0cnt acts as a free-running counter. if the overflow interrupt is enabled in the ofi bit in the tb0run register, an int errupt (inttbcom00) is genera ted upon a counter overflow. tmp19a71 11-3 tmp19a71 (3) timer registers (tb0reg0, tb0reg1) each timer channel has two 16-bit register s conta ining a time constant. when the up-counter reaches the timer constant value in each timer register, the associated comparator block generates a match-detect signal. each of the timer registers (tb0reg0 , tb0r eg1) can be written with a halfword-load instruction. although it is also possible to use a series of two byte-load instructions, be sure to use a halfword-load instruction while the tb0cnt is counting to prevent an erroneous match detect when only the first byte-load instruction has been executed. to write to the timer register while the tb0cnt is counting and double-buffering is disabled, the write timing must be managed by software. one of the two timer registers, tb0reg0, is double-buffered. the double-buffering funct ion can be enabled and disabled through the programming of the dbe bit in the tb0run register: 0 = disable, 1=enable. if double-buffering is enabled, the tb0reg0 latches a new time constant from the register buffer 0. this takes place when a match is detected between the tb0cnt and the tb0reg1. upon reset, the contents of the tb0reg0 and tb0reg1 are cleared to zero; thus, they must be load ed with valid values befo re the timer can be used. a reset clears the tb0run.dbe bit to 0, disablin g the double-buffering function. to use this function, the tb0run.dbe bit must be set to 1 after loading the tb0reg0 and tb0reg1with time constants. when tb0run.dbe=1, the next time constant can be written to the register buffer. the tb0reg0 and the corresponding register buffer are mapped to the same addre ss (0xffff_c70c). when tb0run.dbe=0, a time constant value is written to both the tb0reg0 and the register buffer . when tb0run.dbe=1, a time constant value is written only to the register buffer. therefore, the double-buffering function should be disabled when writing an initial time constant to each timer register. (4) capture registers (tb0cp0, tb0cp1) the capture registers are 16-bit registers used to latch the value of the up-counter (tb0cnt ). each of the capture registers can be read with a halfword-load instruction. although it is also possible to use a series of two byte-load instructions, it is recommended to use a halfword -load instruction while the timer is counting because the register value may be updated before the second byte-load instruction is executed. the cpm field in the tb0mod register is used to select the timing for latching the tb0 cnt value to the tb0cp0 and tb0cp1. furthermore, an up-counter value can be captured under software control: a write of 0 to the tb0 mod.cp0 bit causes the current tb0cnt value to be latched into the tb0cp0. to use the capture capability, the prescaler must be running (i.e., tb0run.prun=1). tmp19a71 11-4 tmp19a71 (5) comparators (tb0cmp0, tb0cmp1) the tmrb0 contains two 16-bit comparat ors. the tb0cmp0 block compares the output of the up-counter (tb0cnt) with a time constant value in the tb0reg0. the tb0cmp1 block compares the output of the tb0cnt with a time constant value in the tb0reg1. when a match is detected, an interrupt (inttbcom0x) is generated. the tb0cmp0 does not detect a match wh en the tb0reg0 value is 0000h whereas the tb0cmp1 detects a match when tb0reg1=0000h. to use the match detect function of the tb0cmp1, setting tb0mod.cle=1 or tb0ff.invc1=1 is required. however, if tb0reg1 is set to 0000h with tb0mod.cle=1, undefi ned operation will result. (6) timer flip-flop (tb0ff) the timer flip-flop (tb0ff) is toggled, if so enabled, upon assertion of match-detect signa ls from the comparators and latch signals from the capture control logic. the toggling of the tb0ff can be enabled and disabled through the programming of the invl1, invl0, invc1, invc0, and mod bits in the tb0ff register. upon reset, the tb0ff is cleared to 0. a write of 00 to the mod field in the tb0ff causes th e tb0ff to be toggled to the opposite value; a write of 01 to this field sets the tb0ffto 1; and a write of 10 to this field clears the tb0ff to 0. the value of the tb0ff can be driven onto the tb0out pin, which is multiplexed with p94. the port 9 registers (p9cr, p9fr 1) must be programmed to configure the tb0out/p94 pin as an output from the tb0ff. after reset, the tb0out pin outputs 0 until the tb0ff.mod field is set. tmp19a71 11-5 tmp19a71 11.3 register description as shown in table 11.3.1 , the main components of the tmrbn block are a 16-bit up-counter, two 1 6-bit timer registers (one of which is double-buffered), two 16-bit capture registers, two comparators, capture control logic and timer flip-f lop control logic. the 11-byte registers provide control over the operating modes and timer flip-flops. table 11.3.1 tmrb register map (1/2) address bits mnemonic register name 0xffff_c700 8 tb0run tmrb0 run register 0xffff_c704 16(8) tb0mod(l) tmrb0 mode register (low) 0xffff_c705 8 tb0modh tmrb0 mode register high 0xffff_c708 8 tb0ff tmrb0 flip-flop control register 0xffff_c70c 16 tb0reg0 tmrb0 compare register 0 0xffff_c710 16 tb0reg1 tmrb0 compare register 1 0xffff_c714 16 tb0cp0 tmrb0 capture register 0 0xffff_c718 16 tb0cp1 tmrb0 capture register 1 0xffff_c71c 16 tb0cnt tmrb0 counter register 0xffff_c720 8 tb1run tmrb1 run register 0xffff_c724 16(8) tb1mod(l) tmrb1 mode register (low) 0xffff_c725 8 tb1modh tmrb1 mode register high 0xffff_c728 8 tb1ff tmrb1 flip-flop control register 0xffff_c72c 16 tb1reg0 tmrb1 compare register 0 0xffff_c730 16 tb1reg1 tmrb1 compare register 1 0xffff_c734 16 tb1cp0 tmrb1 capture register 0 0xffff_c73c 16 tb1cnt tmrb1 counter register tmp19a71 11-6 tmp19a71 table 11.3.2 tmrb register map (2/2) address bits mnemonic register name 0xffff_c740 8 tb2run tmrb2 run register 0xffff_c744 16(8) tb2mod(l) tmrb2 mode register (low) 0xffff_c745 8 tb2modh tmrb2 mode register high 0xffff_c748 8 tb2ff tmrb2 flip-flop control register 0xffff_c74c 16 tb2reg0 tmrb2 compare register 0 0xffff_c750 16 tb2reg1 tmrb2 compare register 1 0xffff_c754 16 tb2cp0 tmrb2 capture register 0 0xffff_c75c 16 tb2cnt tmrb2 counter register 0xffff_c760 8 tb3run tmrb3 run register 0xffff_c764 16(8) tb3mod(l) tmrb3 mode register (low) 0xffff_c765 8 tb3modh tmrb3 mode register high 0xffff_c768 8 tb3ff tmrb3 flip-flop control register 0xffff_c76c 16 tb3reg0 tmrb3 compare register 0 0xffff_c770 16 tb3reg1 tmrb3 compare register 1 0xffff_c774 16 tb3cp0 tmrb3 capture register 0 0xffff_c77c 16 tb3cnt tmrb3 counter register note 1: although the tbxmod is a 16-bit register, it can be accessed as two 8-bit registers: tbxmodl (low) and tbxmodh (high). note 2: the tbxcp0 and tbxcp1 can be read by two byte-load instructions. however, we recommend using a half word-load instruction while the timer is counting as the register value may be updated between two byte-load instructions. note 3: the tb0reg0 and tb0reg1 can be written by two byte-load instructions. however, we recommend using a half word-load instruction as a match with tb0cnt may be erroneously detected when only the first byte has been written. tmp19a71 11-7 tmp19a71 tmrb0 run register 7 6 5 4 3 2 1 0 bit symbol dbe D trgsel cssel idl prun ofi trun read/write r/w reset value 0 0 0 0 0 0 0 0 function double- buffer 0: disable 1: enable must be set as 0. external trigger 0: rising edge 1: falling edge counter star t 0: software start 1: external trig ger tmrb0 operation 0: stop & keep counter value 1:normal operation prescaler start 0: stop and clear 1:run overflow interrupt 0: disable 1: enable timer star t 0: stop and clear 1:run tb0run (0xff ff_c700) note 1: the difference between stopping the timer by setting idl=0 and trun=0 is that idl=0 preserves the tbxcnt value whereas trun=0 clears the tbxcnt value. note 2: when the cssel bit is set to 1, the tb0cnt starts counting triggered by the tb0in pin input as specified in the trgsel bit. to start counting by the external trigger signal, the trun bit must be set to 1. if trun=0, the counter remains stopped and cleared as in the case of software start. note 3: once the counter is started by an external trigger, the trigger is kept internally. to accept a next external trigger , it is necessary to clear and stop the counter by clearing the trun bit to 0 and then to set trun=1 again. any external triggers accepted before the trun bit is cleared to 0 are ignored. tmp19a71 11-8 tmp19a71 tmrb0 mode register 7 6 5 4 3 2 1 0 bit symbol D D cpm cle clk read/write w r/w reset value D D 0 0 0 000 function capture timing 00: disable 10: latches the counter value into tb0cp0 at rising edges of tb0in and gener ates inttbcap01. latches the counter value into tb0cp1 at falling edges of tb0in and generates inttbca00. others: reserved up-counter clear control 0:clearing d isabled 1: clears u p-counter upon a match with tb0reg1 clock source 000: tb0in pin input (tmrb0 only) 001: imclk 010: imclk/2 011: imclk/4 100: imclk/8 101: imclk/16 110: imclk/32 111: imclk/64 tb0mod(l) (0xff ff_c704) 15 14 13 12 11 10 9 8 bit symbol D D D D D D D cp0 read/write r r/w w reset value 0 0 0 0 0 0 0 1 function m u s t b e set as 0. software capture control 0: software ca pture 1:don?t car e this bit is alw ays read as 1. tb0modh (0xffff_c705) note: this register does not support bit manipulation instructions. tmp19a71 11-9 tmp19a71 tmrb0 flip-flop control register 7 6 5 4 3 2 1 0 bit symbol D D invl1 invl0 invc1 invc0 mod read/write w r/w w reset value D D 0 0 0 0 11 function when the up-counter value is latched into tb0cp1 0: toggle- trigger disabled 1:toggle- trigger enabled when the up-counter value is latched into tb0cp0 0: toggle- trigger disabled 1:toggle- trigger enabled when the up-counter value reaches tb0reg 1 0: toggle- trigger disabled 1: toggle- trigger enabled when the up-counter value reaches tb0reg0 0: toggle- trigger disabled 1:toggle- trigger enabled flip-flop control 00: toggles tb0out (soft ware toggle) 01: sets tb0out to 1 10: clears tb0out to 0 11: don?t care this field is always read as 11. tb0ff (0xff ff_c708) tmrb0 compare register 0 7 6 5 4 3 2 1 0 bit symbol cmp0 read/write r/w reset value 0x00 function when double-buffering is enabled, this register stores the value used for the second comparison. tb0reg0 (0x ffff_c70c) 15 14 13 12 11 10 9 8 bit symbol cmp0 read/write r/w reset value 0x00 function note 1: the tb0cmp0 does not detect a match when tb0reg0=0x0000. note 2: to use the inttbcom0x interrupt, capture operation must be disabled by setting tb0mod.cpm=00. when tb0m od.cpm is set to a value other than 00, no interrupt is generated. however, match detection is performed so that the output on the tb0out pin can be toggled. tmrb0 compare register 1 7 6 5 4 3 2 1 0 bit symbol cmp1 read/write r/w reset value 0x00 function this register stores the value used for comparison. tb0reg1 (0xff ff_c710) 15 14 13 12 11 10 9 8 bit symbol cmp1 read/write r/w reset value 0x00 function note 1: the tb0cmp1 detects a match even when tb0reg1=0x0000. note 2: match detection by the tb0cmp1 requires setting tb0mod.cle=1 or tb0ff.inv1=1. tmp19a71 11-10 tmp19a71 tmrb0 capture register 0 7 6 5 4 3 2 1 0 bit symbol cp0 read/write r reset value 0x00 function capture value 0 of the up-counter (low) tb0cp0 (0xff ff_c714) 15 14 13 12 11 10 9 8 bit symbol cp0 read/write r reset value 0x00 function capture value 0 of the up-counter (high) tmrb0 capture register 1 7 6 5 4 3 2 1 0 bit symbol cp1 read/write r reset value 0x00 function capture value 1 of the up-counter (low) tb0cp1 (0xff ff_c718) 15 14 13 12 11 10 9 8 bit symbol cp1 read/write r reset value 0x00 function capture value 1 of the up-counter (high) tmrb0 counter register 7 6 5 4 3 2 1 0 bit symbol cnt read/write r reset value 0x00 function count value of the up-counter (low) tb0cnt (0x ffff_c71c) 15 14 13 12 11 10 9 8 bit symbol cnt read/write r reset value 0x00 function count value of the up-counter (high) tmp19a71 11-11 tmp19a71 11.4 operating modes the 16-bit timer has the following operation modes: (a) 16-bit inter val timer mode (b) 16- bit event counter mode (c) 16-bit pro grammable pulse generation (ppg) mode the tmrb0 has the capture capability used to latch the value of the counter. the capture capabi lity allows: (d) pulse width measurement (e) one-shot pulse generation using an external trigger pulse 11.4.1 16-bit interval timer mode to accomplish periodic interrupt generation , the interval time is set in the tb0reg1 register, and the inttbcom01 interrupt is enabled. example: setting the 20 s interval timer (imclk: 28 mhz) using inttbcom01 1. tb0run = 0x00; // s top timer 0 2. imr25 = 0x00; // disable inttb com00 imr26 = 0x41; // enable int tbcom01 3. tb0ff = 0x0a; // invc1=1, f f=0 tb0mod = 0x010a; // select prescaler (imclk/2 ) tb0reg1 = 0x0118; // set interval time 4. tb0run = 0x0d; // s tart timer imclk/2 tb0cn t 0x011 8 0x000 0 0x011 8 0x000 0 0x011 8 0x0000 tb0reg1 inttbcom01 tb0ou t 0x0001 20sec 71.4ns 0x0000 0x0001 ??? ??? 0x0001 ??? figure 11.4.1 16-bit interval timer mode tmp19a71 11-12 tmp19a71 11.4.2 16-bit event counter mode this mode is used to count events by interpreting the rising edges of the external counter clock (tb0in) as events. the up-counter counts up on each rising edge of the tb0in pin input. the counter value can be latch ed into a capture register under software control. to determine the number of events (i.e., cycles) counted, the value in the capture register must be read. example: setting the event counter 1. tb0run = 0x00; // s top timer 0 2. imr84 = 0x41; // enable int tbcap00 imr85 = 0x00; // disable inttb cap01 3. tb0ff = 0x03; // disable trigger tb0mod = 0x0124; // select external time, imclk/8 tb0reg1 = 0x0050; // set interval time 4. tb0run = 0x0d; // s tart timer tmp19a71 11-13 tmp19a71 11.4.3 16-bit programmable pulse generation (ppg) mode the 16-bit ppg mode can be used to generate a square wave with any frequency and duty cycle. the pulse can be high-going or low-going, as determined by the initial setting of the timer flip-flop (tb0ff). a square wave is generated by toggling the timer flip-flop (tb0ff) every time the up-c ounter (tb0cnt) reaches the value in each timer register (tb0reg0, tb0reg1). the square-wave output is driven to the tb0out pin. in this mode, the following relationship must be satisfied: (tb0reg0 value) < (tb0reg1 value) tb0reg0 match (inttbcom00 interrupt) tb0reg1 match (inttbcom01 interrupt) tb0out pin figure 11.4.2 ppg output waveform if the double-buffering function is enabled, th e tb0reg0 value can be changed dynamically by writing a new value into the register buffer. upon a match between the tb0reg1 and the tb0cnt, the tb0reg0 latches a new value from the register buffer. the tb0reg0 can be loaded with a new value upon every match thus making it easy to generate a square wave with virtually any duty cycle. q 1 q 2 q 2 q 3 shift into tb0reg1 up-counter = q 1 up-counter = q 2 tb0reg0 match tb0reg1 match tb0reg0 (compare value) re g ister buffer write to tb0reg0 figure 11.4.3 register buffer operation tmp19a71 11-14 tmp19a71 example: setting the event counter with double-buffering 1. tb0run = 0x00; // s top timer 0 2. tb0reg0 = 0x0050; // set interval time tb0reg1 = 0x0 080; 3. tb0run = 0x80; // enable double buffer 4. tb0ff = 0x0e; // initialize f lip-flop tb0mod = 0x010d; // select prescaler (imclk/1 6) 5. p9fr1 = 0x10; // p94 tb0out p9cr = 0x10; // p94 output en able 6. tb0run = 0x8d; // s tart timer tb0cnt #00 #10 0 #01 #10 0 #02 write the next value buffer0 tb0reg0 tb0reg1 tb0cmp (note 1) tb1cmp (note 1) inttbcom00 inttbcom01 tb0out variable duty cycle note 1: internal signal perio d #03 #0 2 value #10 value #00 #01 variable duty cycle #0 2 value #01 figure 11.4.4 programmable pulse generation (ppg) mode tmp19a71 11-15 tmp19a71 11.4.4 pulse width measurement the capture function can be used to measure the pulse width of an external clock. the external clock is applied to the tb0in pin. the up-counter (tb0cnt) is programmed to operate as a free-running counter, clocked by one of the prescaler outputs. the capture function is used to latch the tb0cnt value into the capture registers (tb0cp0, tb0cp1) at the clock rising edge and at the next clock falling edge, respectively. the interrupt controller (intc) should be programmed to generate the inttbcap00 interrupt at the falling edge of the tb0in input. multiplying the counter clock period by the difference between the values captured int o the tb0cp0 and tb0cp1 gives the high pulse width of the tb0in0 clock. for example, if the prescaler output clock has a period of 0.5 s and the difference bet ween the tb0cp0 and tb0cp1 is 100, the high pulse width is calculated as 0.5 s x 100 = 50 s. c4 c3 c2 c1 c2 c1 prescaler output clock tb0in0 input (external clock) capture into tb0cp0 inttbcap00 capture into tb0cp1 c3 c4 figure 11.4.5 pulse width measurement the low pulse width of the external clock can be measured by setting the int tbcap01 interrupt to be generated on the rising edge of the tb0in pin, and multiplying the difference between the tb0cp1 value at c2 and the tb0cp0 value at c3 by the prescaler output clock period. if no edge input occurs on the tb0in pin, this can be detected by a counter overflow. tmp19a71 11-16 tmp19a71 11.4.5 one-shot pulse generation using an external trigger pulse the tmrbn can be used to produce a one-time pulse as follows. (1) t he 16-bit up-counter (tb0cnt) is prog rammed to function as a free-running counter, clocked by one of the prescaler outputs. the tb0in pin is used as an active-high external trigger pulse input for latching the counter value into the capture register (tb0cp0). (2) t he interrupt controller (intc) must be programmed to generate an inttbcap01 interrupt upon detection of a rising edge on the tb0in pin. the tb0reg0 is loaded with the sum of the tb0cp0 value (c) and the pulse delay (d) D i.e., (c) + (d). the tb0reg1 is loaded with the sum of the tb0reg0 value and the pulse width (p) D i.e., (c) + (d) + (p). (3) nex t, the invc0 and invc1 bits in the timer flip-flop control register (tb0ff) are set to 11, so that the timer flip-flo p (tb0ff) will toggle when a match is detected between the tb0cnt and the tb0reg0 and between the tb0cnt and the tb0reg1. with the tb0ff toggled twice, a one-shop pulse is produced. upon a match between the tb0cnt and the tb0reg1, the tmrb0 generates the inttbcom01 interrupt, which must disable the toggle trigger for the tb0ff. figure 11.4.6 depicts one-shot pulse generation, with annotations showing (c), (d) and (p ). tb0out (timer output) pin c + d + p c + d c toggle is disabled for a capture into tb0cp1. toggle is enabled. (p) (d) pulse width delay toggle is enabled. inttbcom01 is generated. the tb0cnt value is latched into tb0cp0. inttbcap01 is generated. counter clock (internal clock) the counter is free-running. tb0in0 input pin (external trigger pulse) tb0reg0 match tb0reg1 match inttbcom00 is generated. figure 11.4.6 one-shop pulse generation (with a delay) tmp19a71 11-17 tmp19a71 example: generating a one-shot pulse with a width of 2 ms an d a delay of 3 ms on assertion of an external trigger pulse on the tb0in pin clocking conditio ns: system clock: 56 mhz prescaler clock: imclk/2 (imclk = fsys/2) settings in the main routine place the counter in free-running mode. 7 6 5 4 3210 select imclk/2 as the counter clock source. tb0mod ? ? 1 0 0010 latch tb0cnt value into tb0cp0 at rising edges of the tb0in input. tb0ff ? ? 0 0 0010 clear tb0ff0 to 0. disable the toggle trigger for tb0ff0. p9ier ? ? ? 1 ? ? ? ? p9cr ? ? ? 1 ? ? ? ? p9fr1 ? ? ? 1 ? ? ? ? configure the p94 pin as tb0out. imr85 x 1 0 0 x 1 0 0 imr25 x 1 0 0 x 0 0 0 enable inttbcap01 and disable inttbcom00. tb0run ? 0 x x 1 1 x 1 start tmrb0. settings in inttbcap01 tb0reg0 tb0cp0 + 3ms/( imclk/2) tb0reg1 tb0reg0 + 2ms /(imclk/2) tb0ff ? ? ? ? 1111 enable the tb0ff0 toggle trigger for tb0reg0 and tb0reg1 matches. imr25 x 1 0 0 x 1 0 0 enable inttbcom00. settings in inttbcom01 tb0ff ? ? ? ? 0011 disable the tb0ff0 toggle trigger for tb0reg0 and tb0reg1 matches. imr25 x 1 0 0 x 0 0 0 disable inttbcom00. x: don't care, ? : no change if no delay is necessary, enable the tb 0ff toggle trigger fo r a capture of the tb0cnt value into the tb0cp0. use th e inttbcap01 interrupt to load the tb0reg1 with a sum of the tb0cp0 value (c) and the pulse width (p) and to enable the tb0ff toggle trigger fo r a match between the tb0cnt and tb0reg1 values. a match generates the inttbcom1 interrupt, which then is to disable the tb0ff toggle trigger. tmp19a71 11-18 tmp19a71 c + p c toggle is enabled. (p) pulse width the tb0cnt value is latched into tb0cp0. inttb0cap01 is generated. counter clock (prescaler output clock) tb0in input (external trigger pulse) tb0reg1 match tb0out (timer output) pin the tb0cnt value is latched into tb0cp1. inttbcom01 is generated. toggle is enabled for a capture into tb0cp0. toggle is left disabled for a capture into tb0cp1 so that it will not be toggled. figure 11.4.7 one-shot pulse generation (without a delay) tmp19a71 11-19 tmp19a71 11.4.6 one-shot pulse generation using an external count start trigger using an external count start trigger enables one-shot pulse generation with a shorter delay . (1) t he 16-bit up-counter (tb0cnt) is programmed to count up on the rising edge of the tb0in pin (tb0run.tregsel=1, tb0run.cssel=1). the tb0reg0 is loaded with the pulse delay (d), and the tb0reg1 is loaded with the sum of the tb0reg0 value (d) and the pulse width (p)?i.e., (d) + (p). (2) t he tb0cnt is programmed to start counting on the rising edge of the external trigger pulse. (3) nex t, the invc0 and invc1 bits in the timer flip-flop control register (tb0ff) are set to 11, so that the timer flip-flop (tb0 ff) will toggle when a match is detected between the tb0cnt and the tb0reg 0 and between the tb0cnt and the tb0reg1. with the tb0ff toggled twice, a one-shot pulse is produced. upon a match between the tb0cnt and the tb0reg1, the tmrb0 generates the inttbcom01 interrupt, which must disabl e the toggle trigger for the tb0ff. figure 11.4.8 depicts one-shot pulse generation, with annotations showing (d) and (p ). tb0out (timer output) pin d + p d 0 toggle is disabled for a cpature into cap1. toggle is enabled. (p) (d) pulse width delay toggle is enabled. inttbcom01 is generated. counter clock (internal clock) the counter starts on the risinge edge of external trigger. tb0in0 input pin (external trigger pulse) tb0rg0 match tb0rg1 match inttbcom00 is generaged. figure 11.4.8 one-shot pulse generation using an external count start trigger (with a delay) tmp19a71 11-20 tmp19a71 12. serial i/o (sio) 12.1 overview the tmp19a71 contains four channels of serial i/o (sio0 to sio3). the sio2 and sio3 can be used in uart mode (asynchronous) and i/ o interface mode (synchronous). the sio0 and sio1 only support uart mode. the sio0 and sio1 do not have the sclk and cts pins; thus an external clock cannot be used as a uart transfer clock in these channels. i/o interface mode mode 0: transmits/rece ives a ser ial clock (sclk) as well as data streams for a synchronous clock mode of operation mode 1: 7 data bits ? ? uart mode mode 2: 8 data bits mode 3: 9 data bits in mode 1 and mode 2, each frame can include a parity bit. in mode 3, the wake-up feature is available for multidrop applications in which a master station is connected to several slave stations through a serial link. figure 12.2.1 shows a block diagram of the sio2. the main components of an sio channel are a clock prescaler, a serial clock generator, a receive bu ffer, a receive controller, a transmit buffer and a transmit controller. each sio channel is independently programmable and functi onally equivalent. in the following sections, any references to the sio2 also apply to the other channels unless otherwise noted. bit 0 1 2 3 4 5 6 start stop bit 0 1 2 3 4 5 6 start stop parity bit 0 1 2 3 4 5 6 bit 0 1 2 3 4 5 6 start stop start stop parity 7 7 7 bit 0 1 2 3 4 5 6 start 8 7 stop bit 0 1 2 3 4 5 6 start stop (wake-up) bit 8 7 bit 8 = 1: address (select code) bit 8 = 0: data mode 0 (i/o interface mode): msb first goes out first mode 1 (7-bit uart mode) mode 2 (8-bit uart mode) mode 3 (9-bit uart mode) without parity with parity without parity with parity 0 bit 7 6 5 4 3 2 1 mode 0 (i/o interface mode): lsb first goes out first 7 bit 0 1 2 3 4 5 6 figure 12.1.1 dat a formats tmp19a71 12-1 tmp19a71 12.2 block diagram (sio2 64 128 2 4 8 16 32 imclk/2 imclk/128 imclk/32 imclk/8 prescaler imclk serial clock generator selector divider imclk/2 imclk/128 imclk/32 imclk/8 selector selector selector baud rate generator 2 tb2out (from tmrb2) i/o interface mode uart mode br2cr br2cr |